Command
You can create new commands in app/commands
Decorator
Decoratorparameter
type
required
cooldown
number
guilds
string[]
builder
any
Template
Templateimport { Client, CommandInteraction, SlashCommandBuilder } from "discord.js";
import { Command } from "engine";
@Command(5, ["*"], new SlashCommandBuilder().setName("ping").setDescription("Replies with Pong!"))
export default class PingCommand {
public static async callback(client: Client, interaction: CommandInteraction) {
await interaction.reply("Pong!");
}
}Permissions
PermissionsGlobals (only available to commands)
Globals (only available to commands)Definition
Usage
Example
Options
OptionsLast updated