Options
All
  • Public
  • Public/Protected
  • All
Menu

The Command Class

// Usage
export class <CommandName>Command extends YinYangCommand.Command {
constructor() {
super({
aliases: ['<aliasName>'],
category: YinYangCommand.CommandCategories.<CategoryName>,
description: 'A Description of some sort',
enabled: true,
guildOnly: false,
name: '<commandName>',
usage: '<commandName> <params...>',
options: [<CommandInteractionOption>],
ownerOnly: false,
});
}

runNormal(ctx: YinYangCommand.CommandContext) {
ctx.channel.send('hi');
}

runSlash(ctx: YinYangCommand.SlashContext) {
ctx.commandInteraction.reply('hi');
}
}

Hierarchy

  • ICommand
    • Command

Implements

Index

Constructors

  • Command Options

    Parameters

    Returns Command

Properties

aliases: string[]
description: string
enabled: boolean
guildOnly: boolean
name: string
options: ApplicationCommandOptionData[]
ownerOnly: boolean
permission?: PermissionLevel
usage: string

Methods

  • The Commands Context.

    note

    Treat this as a internal

    Parameters

    Returns void

    the Commands Commands method

  • The Slash Commands Context.

    note

    Treat this as a internal

    Parameters

    Returns void

    the Slash Commands method

  • The Commands Context.

    Parameters

    Returns Promise<void>

    the Commands Commands method

  • The Slash Commands Context.

    Parameters

    Returns Promise<void>

    the Slash Commands method