I am coding a discord bot. When someone replies to a message with a specific command, the bot will create a poll to decide what to do with the replied-to message.
When the bot handles the command, how can it find the message (if any) that the command is replying to?

Assuming you already have the message with the command:
This will throw a
discord.errors.NotFounderror if the channel or message cannot be found.https://discordpy.readthedocs.io/en/latest/api.html#discord.MessageReference