Return a disnake.Message object when inter.send() -ing
See original GitHub issueSummary
Doing ctx.send with disnake.Context returns a disnake. Message object, while inter.send doesn’t return anything. I suggest to return the message
What is the feature request for?
The core library
The Problem
Disclaimer: I’m going to use ctx
as a keyword, but that’s still an interaction.
If I use ctx.send('Hello world')
in a message command (with disnake.Context
), the method returns a disnake.Message
.
In the contrary, using ctx.send('Hello world')
in a slash command, component… (with disnake.Interaction
), the method doesn’t return anything.
The Ideal Solution
Using ctx.send('Hello world')
with disnake.Interaction
returns a disnake.Message
object.
The Current Solution
Using ctx.send('Hello world')
with disnake.Interaction
doesn’t return anything (because the API doesn’t return anything, I consider fetching the message after sending it to return an object).
Additional Context
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
That’s exactly what I want, thanks for your help.
If I understand correctly, the best solution for you would be
await ctx.original_message()
, which fetches and returns the original message. Link to documentation.