error with command .delete () #895
-
I wanted a way to delete the messages from the bot without having to delete them manually with administrator permissions, so it manages to make it put an emoji reaction in its messages so that if someone gives that reaction the message is deleted, the problem is that when you do it the second time, you get an error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think we need some more details here. So you put an emoji on a message, and if people click it, you delete it? |
Beta Was this translation helpful? Give feedback.
-
if you mean deleting a message by clicking on a reaction, then there will be no error, because after the first click, it will be deleted. Maybe, I misunderstood you |
Beta Was this translation helpful? Give feedback.
I think we need some more details here. So you put an emoji on a message, and if people click it, you delete it?
Now, where does the error come in here? And what is the error? If it's caused by two people clicking on the same reaction at roughly the same time, both guard it with
message.deleted
and catch the error (if they do it close to each other there isn't really a way to guarantee this won't put both API requests through, of which one will error, because it is already fulfilled)