A Node.js Discord API for Slash commands Example-> get All command: constslashCommndjs=require('discord.js-slah')constslash=newslashCommndjs.InteractionsClient(process.env.TOKEN,process.env.BOTID)constallCommands=awaitslash.getCommands()//returns Arrayconsole.log(allCommands)/// output => [{...
status: 404, method: 'DELETE', url: 'https://discord.com/api/v10/applications/998433286261067807...
slashCommands.push(command.data.toJSON()); if (client.application) 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\ma...
Distube & Discord.JS@v14 (Slash Commands!). Contribute to Adivise/DisSpaceX development by creating an account on GitHub.
Commands Template GitHub NPM Resources & References This project borrows resources and references from the following repositories: dbots.js eris discord.js Commando slash-worker slash-commands discord-interactionsAbout 🗡️ Creator and handler for Discord's slash commands slash-create.js.org Topics...
比如来个commands/pingDeferred.js: const{SlashCommandBuilder}=require('discord.js');constwait=require('node:timers/promises').setTimeout;// 注意这里!!!module.exports={data:newSlashCommandBuilder().setName('ping4').setDescription('Replies with Pong, but deferred!'),asyncexecute(interaction){//...
代码commands/subCmd.js: const{SlashCommandBuilder}=require('discord.js');module.exports={data:newSlashCommandBuilder().setName('subcmd').setDescription('Subcommand! Reply with user\'s or server \'s info.').addSubcommand(subcommand=>subcommand.setName('user').setDescription('Info about a user...
问如何在Discord.js v14 (Slash命令)中调度bot消息?EN在今天举办的#2022特斯拉AI日#上,马斯克说,...
https://discord.com/api/oauth2/authorize?client_id=123456789&scope=applications.commands%20bot&permissions=0 将这个链接复制到浏览器中打开,如果你是服务器的所有者或管理员,就可以将机器人添加到你的服务器了。 三、推荐听歌机器人:Discord Player Bot ...
/* bot-slash-commands.module.ts */ import { DiscordModule } from '@discord-nestjs/core'; import { Module } from '@nestjs/common'; import { InjectDynamicProviders } from 'nestjs-dynamic-providers'; @InjectDynamicProviders('**/*.command.js') @Module({}) export class BotSlashCommandsModu...