问题描述
我正在使用猫鼬和discord.js。我无法修复称为TypeError的错误。
events.js:292
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'Note' of undefined
这是我的代码。我尝试了多种方法来修复它,但似乎无济于事。
async function getmynote() {
noteModel.find({UserID: message.author.id}).exec(function(err,total) {
if(err) {
message.channel.send("Bocs de nem találtam azt a megjegyzést!")
}
const note = new Discord.MessageEmbed()
.setAuthor(message.author.tag)
.setColor("RANDOM")
.setTitle("A te " + args[1] + ". Note-od")
.setDescription(`Note : \`${total[args[1]-1].Note}\``)
message.channel.send(note)
})
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)