#Message ID of ctx.respond

1 messages · Page 1 of 1 (latest)

rich gorge
#

Hey friends,
is there any way to get the message (ID) of the bot's response to a slash command?
I thought maybe ctx.respond would return the message similar to .send or .reply, but it doesn't.
My goal is that the bot should read follow-up messages after the command, but only if it's a reply to the bot's command response.

Here I wrote a method that checks if a message is by the right author and a reply to activeMsg which should be the bot's command response.

def checkReply(author, message: discord.Message, activeMsg: discord.Message):
  return (message.author == author and message.reference is not None and message.reference.message_id == activeMsg.id)```
small forge
#

await ctx.original_message()

rich gorge
small forge
#

try await ctx.interaction.original_message() then