我想尝试一个命令处理程序,但是我有一个错误。如果运行,ping,bot是响应,但如果运行,,则会得到一个错误,这是日志:
TypeError: Cannot read property 'execute' of undefined
at Client.<anonymous> (C:\Users\User\disbot\app.js:35:33)
at Client.emit (node:events:394:28)
at MessageCreateAction.handle (C:\Users\User\disbot\node_modules\discord.js\
我正在使用discord.js,我正在执行一个ban命令,我得到了一个错误:UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'calculatedPosition' of undefined
我的代码是:
let banUser = message.guild.member(message.mentions.users.first())
let bannerHighRole = message.member.highestRole.calculatedPosition;
let getBanne
因此,我试图为我的机器人创建一个stats命令,但每当我运行该命令时,我都会收到以下错误: TypeError: Cannot read property 'size' of undefined
at Object.execute (C:\Users\jack\Bot\commands\stats.js:19:51)
at module.exports (C:\Users\jack\Bot\events\message.js:44:13)
at processTicksAndRejections (internal/process/task_queue
TypeError: Cannot read property 'play' of undefined
at C:\Users\pink\Desktop\IwtdB0t_v.7\node_modules\discord.js-musicbot-addon\index.js:1474:41
at processTicksAndRejections (internal/process/task_queues.js:93:5)
我已经尝试将每个discord.js v11命令更新为discord.js v12,但从playStream更改为play后仍然出现错误。你知道是什么原因造成
因此,基本上,我试图使用message.mentions.channels向特定频道发送通知。
ex !announce #announcements Today is a great day!
错误:
(node:5516) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channels' of undefined
at Object.module.exports.execute (C:\Users\Zarko\Desktop\Stackoverflow\commands\Answ
当我尝试运行我的angular应用程序时,我得到了一个错误。我已经安装了nodejs,python,电子,但不能运行应用程序...我在CMD中写了"npm start“命令,但是我得到了一个类似这样的错误:
C:\xampp\htdocs\string-desktop>npm start
npm WARN invalid config registry=""
npm WARN invalid config Must be a full url with 'http://'
npm WARN invalid config registry="