使用Client#destroy()后Discord.js无法登录 [英] Discord.js unable to login after using Client#destroy()
本文介绍了使用Client#destroy()后Discord.js无法登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
switch (command[0])
{
case 'restart':
if(msg.author.id == config["owner"]){
msg.channel.send(preEmbed('clientRestart'));
client.destroy();
client.login(config["token"]);
}
break;
}
这会导致错误 DiscordjsError:请求使用令牌,但客户端无法使用令牌.
有人知道原因/解决方法吗?
anyone know the cause / fix?
推荐答案
According to discord.js' github repo, you get that message when you don't provide a token, so make sure you are providing the token correctly.
这篇关于使用Client#destroy()后Discord.js无法登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文