We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The new interaction resond() is using utils.MISSING for messages without embeds
The core library
respond() and send() are behaving differently in that way.
Example: I am using a wrapper function like:
async def channel_send(self, ctx, embed = None, text = None, view = None): if isinstance(ctx, discord.ext.commands.context.Context): message = await ctx.channel.send(content=text, embed=embed, view=view) elif isinstance(ctx, discord.commands.ApplicationContext): await ctx.respond(content=text, embed=embed, view=view) message = await ctx.interaction.original_message()
to support both slash commands and current prefix commands. But with the current behavior, embed=None would not work
Also use None als default value for respond()
respond()
Currently I am using it like this:
async def channel_send(self, ctx, embed = None, text = None, view = None): if isinstance(ctx, discord.ext.commands.context.Context): message = await ctx.channel.send(content=text, embed=embed, view=view) elif isinstance(ctx, discord.commands.ApplicationContext): await ctx.respond(content=text, embed=embed if embed else discord.utils.MISSING, view=view) message = await ctx.interaction.original_message()
The text was updated successfully, but these errors were encountered:
BTW: I just saw that view also needs MISSING and its not just a respond() related "issue", it affects all interactions.
view
MISSING
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Summary
The new interaction resond() is using utils.MISSING for messages without embeds
What is the feature request for?
The core library
The Problem
respond() and send() are behaving differently in that way.
Example:
I am using a wrapper function like:
to support both slash commands and current prefix commands. But with the current behavior, embed=None would not work
The Ideal Solution
Also use None als default value for
respond()
The Current Solution
Currently I am using it like this:
The text was updated successfully, but these errors were encountered: