{
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 .JS
{
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./hydrabolt/Discord.JS
Share Improve this question edited Jul 26, 2016 at 3:45 Josh P asked Jul 26, 2016 at 3:28 Josh PJosh P 592 silver badges11 bronze badges2 Answers
Reset to default 2bot.on("message", function(message)
{
setTimeout(function()
{
bot.deleteMessage(message)
}, 120000);
});
This is what it ended up looking like, thank you Joundill for the help.
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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745275429a4620010.html
评论列表(0条)