How to delete a specific message by ID using discord.py

Viewed 23957

I am trying to delete a message using it's ID. I am using discord.py.

Logic Flow

User sends command. example: !message hi
Bot deletes "!message hi" using User's message ID
Bot says "hi"

I have figured out how to get it to copy my messages, but I am having difficulty getting it to delete them. I didn't want to say that it deletes the message before it's one otherwise on busy servers it might not work. I wanted to get the command message's ID then delete it using it's ID.

2 Answers
Related