Josh P Josh P - 4 months ago 315
Javascript Question

How to use deleteMessage to get a Discord bot to clear a messge after () minutes

{
setTimeout(function()
{
deleteMessage()
}, 120000);
}


Trying to get my bot to delete a message after () minutes of it being sent what would I use to do this. If needed, the library I used was https://github.com/hydrabolt/Discord.JS

Answer

I suggest using this function in a setTimeout, like you currently have.

http://discordjs.readthedocs.io/en/latest/docs_client.html#deletemessage-message-options-callback

Comments