我试图为我的不和谐机器人发出一个帮助命令,当我输入.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
因此,基本上,我试图从一个通道获取嵌入,然后将其发送到另一个通道,但它给出了一个错误,说明有一些关于空消息的信息。 完全错误: 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,我遇到了这个错误。我试着让它,所以如果用户说!派系它会要求他们说他们的派系名称,然后,一旦他们发送了他们的派系名称,它询问他们更多的信息,他们的派系。这是我的密码:
factionEmbed = {
title : "Request to create faction.",
color : embedColor,
description : "Please reply with your faction name.",
author : {
name : message.author.username,
icon_url
尝试使用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
我正在使用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
我在试着做一个发送嵌入的命令。但是由于某些原因,它一直在说DiscordAPIError: Invalid Form Body data.embeds[0].description: This field is required Error,尽管描述不是空格。 我将它托管在heroku中,所以错误来自于日志。 命令脚本: module.exports = {
name: "test",
desc: "A test command",
cmd: async (interaction, utils) => {
awai
实际上,我尝试使用discord.js创建一个机器人,并尝试执行帮助命令。 我不明白我的循环为什么要这样做(我知道这不是一个好方法) let i = 0;
const embed = new RichEmbed();
if (args.length < 1) {
embed.setColor('#5B4DCA');
while (i < list_groups.length) {
let x = 0;
embed.setTitle(`${list_groups[i]}`)
while (x < groups.length)
我的机器人出了点问题。我得到了错误 RangeError [EMBED_FIELD_NAME]: MessageEmbed field names must be non-empty strings.
at Function.verifyString (C:\Users\beucodi\Documents\r-Wof-bot\node_modules\discord.js\src\util\Util.js:413:41)
at Function.normalizeField (C:\Users\beucodi\Documents\r-Wof-bot\node_modules\
Discord.js v12禁用按钮功能
如何在discord.js上单击按钮后禁用该按钮?我试过使用collector.on函数,因为这似乎可以做到,但我不能让它与我的代码工作,我知道,我没有复制粘贴,但我似乎无法解决它,这让我压力很大,我在所有的网络寻找答案,但没有任何地方。不和谐的按钮js指南就消失了。好吧,你来到了正确的地方,你可以简单地做下面的解释,并能真正帮助你。
因此,因为最后的答案是不正确的,但有一些正确的格式,这是你想要做的。下面是我能解释的最好的代码。
“守则”:
// After you have made your buttons and the embed yo