/* registration.command.ts */ import {Command, InteractionEvent, Handler} from '@discord-nestjs/core'; import {SlashCommandPipe} from '@discord-nestjs/common'; import {Injectable} from '@nestjs/common'; import {RegistrationDto} from './registration.dto'; @Command({ name: 'reg', descripti...
定义一个斜杠命令处理函数,并使用@slash.slash装饰器将其注册为斜杠命令: 在上面的代码中,command_name是斜杠命令的名称,description是斜杠命令的描述。command_function是处理斜杠命令的函数,ctx是上下文对象,包含了命令的相关信息。 运行Discord客户端: 运行Discord客户端: 在上面的代码中,将YOUR_BOT_TOKEN替换为你的...
In this tutorial, you will build a Discord bot from scratch, usingNode.jsand theDiscord.jslibrary, which allows users to directly interact with the Discord API. You’ll set up a profile for a Discord bot, get authentication tokens for the bot, and program the bot with the ability to pro...
Kaelly-dashboardis a first draft of a dashboard website (Node/Express/DiscordJS) to configure KaellyBot on your server. This project is paused, not prior and not used. The chosen technologies are not totally defined and will probably change in the future. ...
# create 2 application commands with the same name # first the slash command @commands.slash_command(name='unmute', description="Unmute a user", guild_ids=config.slash_guilds) @commands.has_permissions(manage_roles=True) @commands.bot_has_permissions(manage_roles=True, send_messages=True) asyn...
You can create slash commands, user and message context menus The run method interaction typing is defined according to the command type import { ApplicationCommandType } from "discord.js"; import { Command } from "#base"; new Command({ name: "ping", description: "Ping command", dmPermissio...
lefthook.yml [lefthook] Update build command May 1, 2022 package.json Add clean option for *nix OS May 11, 2022 slash-up.config.js Post guild count to more bot lists & Refactor env var names May 11, 2022 tsconfig.json v2.0 Apr 30, 2022 ...
AeroClient also features something new in discord.js frameworks: middleware. Docs The docs for this framework can be found here Features Aliases Logger Persistable Prefixes Cooldowns Command handling Many flags to choose and enable; some are listed below args if arguments are required guildOnly ...
You can create slash commands, user and message context menus The run method interaction typing is defined according to the command type import { ApplicationCommandType } from "discord.js"; import { Command } from "#base"; new Command({ name: "ping", description: "Ping command", dmPermissio...