pycord
pycord copied to clipboard
[ext.bridge] Permission decorators and invoke function
Summary
- A
guild_only
andhas_permissions
decorator that can be used for both app and bridge commands for "frontend" and "backend" validation. - Allow BridgeCommand to be directly invoked (e.g.
@bridge.bridge_command()
async def a_command(self, ctx):
await other_bridge_cmd.invoke(ctx, ...)
Information
- [ ] This PR fixes an issue.
- [x] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed).
- [ ] This PR is not a code change (e.g. documentation, README, typehinting, examples, ...).
Checklist
- [x] I have searched the open pull requests for duplicates.
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [ ] If
type: ignore
comments were used, a comment is also left explaining why.