所以我制造了一个不和谐的机器人,并试图用discord.js、节点操作系统和ytdl核心来实现音乐。但是随机地,在执行命令(主要是>>stop)时,我将得到一个ReferenceError,它将完全停止命令,而另一次尝试时,如果没有更改,该命令将成功完成。有什么帮助吗?
下面是执行命令时随机发生的错误。
(node:11740) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined
at StreamDispatcher.<anonymous> (C:\Users\###\Des
ReferenceError: clinet is not defined
at Client.<anonymous> (/Users/gavinmartin/Desktop/myshadow/main.js:34:9)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (/Users/gavinmartin/Desktop/myshadow/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.modu
正在为个人不和谐的服务器制作一个机器人,当检测到命令"Blyat“时,只想让它加入一般的voicechat,播放mp3文件,当它离开的时候。代码:
var Discord = require('discord.js');
var client = new Discord.Client();
var isReady = true;
client.on('message', message => {
if (command === "Blyat") {
var VC = message.member.voice
为什么这会抛出一个ReferenceError?
var p = new Proxy({}, {
get: function(target, name) {
return `hello world ${name}`;
}
});
with (p) { console.log(a) }
未定义的ReferenceError: a未定义
我试图在phonegap应用程序中保存用户信息,但在尝试时
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
console.log('file system open: ' + fs.name);
fs.root.getFile("newPersistentFile.txt", { create: true, exclusive: false }, function (fileEntry) {
console.log("fileEntry is f
当我尝试运行我的代码ReferenceError时,我得到这个错误: message is not defined at Client.<anonymous> (C:\Users\Diego M\Desktop\DiscordBot\index.js:14:1)
at Client.emit (node:events:390:28)
at MessageCreateAction.handle (C:\Users\Diego M\Desktop\DiscordBot\node_modules\discord.js\src\client\actions\MessageCreate.j