【发布时间】:2020-06-05 01:10:08
【问题描述】:
代码:
const specifyembed = new Discord.MessageEmbed()
.setAuthor("Auto-Partner", client.user.displayAvatarURL())
.setThumbnail(client.user.displayAvatarURL())
.setDescription("**__Want to grow fast?__** \nWith this bot you can gain up to **3,000 Members** per week! \nThis bot will share your server in many active servers and to many active users! \nSimply add me to your server and use the command ``-partner {MESSAGE}``")
.addFields([
{
name: '**__Bot Invite Link:__**',
value: '[- Click To Add Bot -](your link goes here)'
}
])
.setTimestamp()
.setFooter("© Auto-Partner")
if(!args[0]) return message.channel.send(specifyembed)
错误:
(node:7920) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined
因此,如果有人对如何解决此问题有任何解决方案,请帮助我。
【问题讨论】:
-
请您分享您的其余代码(当然要删除令牌)?我不认为你的错误发生在这个代码块中,我不知道变量“client”是什么。谢谢!
-
是的,我还是一样,我在 index.js 中缺少一行代码,所以我修复了它
-
您能分享您的所有代码吗?我真的不认为这个部分有错误。编辑:确保从共享代码中删除令牌。
-
我修好了别担心
-
@rez 你能在答案部分添加你自己的解决方案吗?
标签: discord.js