我正在使用 discord.js 和 WOKCommands 中的使用斜线功能,但在discord中输入时,报错: Invalid interaction application command 代码如下: const { MessageEmbed } = require("discord.js"); // Simple command for the message module.exports = { name: "ping", slash: "both", testOnly: false, description...
client.application.commands.set(command.data.name, command); //happens here else { console.error(client); throw new Error("Unable to load the commands"); } } } 错误消息如下所示: C:\Overbot\node_modules\discord.js\src\managers\ApplicationCommandManager.js:147 data: commands.map(c => this...
所以我按照 discord bot 的破旧钥匙教程进行操作,但我不知道问题出在哪里,这是错误 /home/container/node_modules/discord.js/src/rest/RequestHandler.js:349 throw new DiscordAPIError(data, res.status, request); ^ DiscordAPIError: Missing Access at RequestHandler.execute (/home/container/node_modules/di...
我们在上面的commands/subOption.js中看到,我们通过.setName("giftest")设置了 name 字段的值,通过.setDescription("MultiOption test.")设置了 description 字段的值,通过.setMinValue(1)设置了 minValue 的值。这些都是利用 discord.js 定义好的方法来设置属性的值,它们有个共同特点,就是都是 “set” 开头的...
Bot in Discord with discord.js (1) 前言 利用 discord.js 建立一个 Discord 机器人。 我也是第一次上手,利用博客来记录我的学习过程,定期整理后再发到公众号。 在简单对比了 discord.js (JavaScript),discordgo (Go
commands/contextMenus/contextBoom.js: const { ContextMenuCommandBuilder, ApplicationCommandType } = require('discord.js'); module.exports = { data: new ContextMenuCommandBuilder() // 设置外显名称 .setName('Boom') // 设置上下文菜单的类型 ...
discord-tsx-commands requires discord-tsx-factory and discord.js. discord-tsx-commands is compatible with discord-tsx-factory version 0.2.19-a and discord.js version 14.10.0 - 14.11.0. (See peerDependencies) import { createElement, Fragment, Client } from "discord-tsx-factory"; import * as ...
DiscordJS机器人是一个基于JavaScript的开源机器人框架,用于在Discord平台上创建和管理机器人。它提供了丰富的API和功能,使开发者能够轻松地构建自定义的Discord机器人。 ...
Updated to the latest version of discord.js v14.x. Supports all possible type of commands. Message commands. Application commands: Chat Input User context Message context Handles components. Buttons Select menus Modals Autocomplete Easy and simple to use. Advanced command options. Simple Database...
DiscordAPIError[50035]:无效表单Body 5[APPLICATION_COMMANDS_DUPLICATE_NAME]:应用程序命令名必须是唯一...