Command

You can create new commands in app/commands

Decorator

parameter
type
required

cooldown

number

guilds

string[]

builder

any

You can specify guilds by their ids as an array. ["1", "2", "3"] or ["*"]

Template

import { 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

You can use PermissionFlagsBits (all permissions)

Globals (only available to commands)

Definition

Usage

Example

Options

Last updated