我试图为我的不和谐机器人发出一个帮助命令,当我输入.help时,它会出现一个错误。
/app/node_modules/discord.js/src/util/Util.js:416
if (typeof data !== 'string') throw new error(errorMessage);
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
at
所以我制造了一个不和谐的机器人,并试图用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
尝试使用discord.js将不一致消息编辑为RichEmbedded消息时,出现错误
(node:10860) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.timestamp: Could not parse 1581492006141. Should be ISO8601.
at item.request.gen.end (/rbd/pnpm-volume/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/node_modules/.registry.n
因此,基本上,我试图从一个通道获取嵌入,然后将其发送到另一个通道,但它给出了一个错误,说明有一些关于空消息的信息。 完全错误: Received 1 messages
/home/bot/node_modules/discord.js/src/rest/RequestHandler.js:298
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Cannot send an empty message
at RequestHandler.execute
我正在使用discord.js,并且我想创建一个嵌入消息,但是我得到了以下错误: TypeError: (intermediate value).setColor(...).setTitle(...).setUrl is not a function
at Client.<anonymous> (C:\Users\oussa\OneDrive\Bureau\Discord Bot\index.js:48:10)
at Client.emit (events.js:326:22)
at MessageCreateAction.handle (C:\Users