-
-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ext.bridge improvements #1496
ext.bridge improvements #1496
Conversation
* Bridge Groups * `is_app` attribute to better differentiate contexts * Simplify bridge classes and such
- feels a bit hacky so might revise later? - also *maybe* allow *.discordapp.net urls to be transformed into attachments?
* turn property to simple attribute * doc rewording * rm extra parentheses Co-Authored-By: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Could we add an example? |
I get the following error on startup now:
The code I used: bot = bridge.Bot(command_prefix="t.", intents=Intents.all())
@bot.bridge_group(description="Test command")
async def hello(ctx: bridge.BridgeContext):
...
@hello.command()
async def there(ctx: bridge.BridgeContext, attachment: Attachment):
await ctx.respond(attachment.filename) |
"temporary fix" until I make a pr to fix this library-wide (slash command groups register without subcommands???) because it would be "out of scope"
subcommands of ext commands don't have the custom transform method to deal with attachment options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed and an example was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully the last review for this pr 😅
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job
Summary
Makes a bunch of changes to ext.bridge
bridge.map_to
decorator to use main command as subcommandis_app
property added to better differentiate context typesInformation
Checklist
type: ignore
comments were used, a comment is also left explaining why.