-
-
Notifications
You must be signed in to change notification settings - Fork 482
Closed
Labels
bugSomething isn't workingSomething isn't workingfeature requestNew feature requestNew feature request
Milestone
Description
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:
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
The Ideal Solution
Also use None als default value for respond()
The Current Solution
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()
krittick
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfeature requestNew feature requestNew feature request