【发布时间】:2019-11-17 10:19:17
【问题描述】:
无论如何我可以在机器人重新启动后如何编辑我的消息,我希望他发送一条消息,现在重新启动,重新启动后它应该将消息编辑为完成:white_checkmark:
console.log(message.author.tag + ' restarted The bot')
message.reply('You restarted the bot, wait a few seconds') // <-- this message should be edited
bot.channels.get("593824605144088586").send(message.author.tag + ' restarted the bot')
bot.channels.get("593824605144088586").send('---------------------------------------------------')
setTimeout(function () { resetBot() }, 5000);
function resetBot() {
restarted = true;
bot.channels.get("593824605144088586").send('Restarting...')
.then(msg => bot.destroy())
.then(() => bot.login(auth.token));
}
【问题讨论】:
标签: discord discord.js