Class

Command

Command(data)

Constructor

# new Command(data)

Класс команды

Parameters:
Name Type Description
data ICommand

View Source core/commander/command.ts, line 25

Example
new Command({

 name: 'test',
 description: 'test command',
 categories: ['test'],

 params: {
     emoji: '📄'
},

 handler(context) {
     context.send('test');
 }
})
 pattern: /test/i,

Classes

Command

Members

Array.<string>

# categories

View Source core/commander/command.ts, line 45

Array.<string>

# categories

View Source core/commander/command.ts, line 139

# commands

массив подкоманд

Properties:
Name Type Description
commands Array.<Command>

View Source core/commander/command.ts, line 55

Array

# commands

массив подкоманд

Properties:
Name Type Description
commands Array.<Command>

View Source core/commander/command.ts, line 153

# description

описание

Properties:
Name Type Description
description string

View Source core/commander/command.ts, line 41

string

# description

описание

Properties:
Name Type Description
description string

View Source core/commander/command.ts, line 133

# handler

обработчик комманды

Properties:
Name Type Description
handler THandlerCommand

View Source core/commander/command.ts, line 60

THandlerCommand

# handler

обработчик комманды

Properties:
Name Type Description
handler THandlerCommand

View Source core/commander/command.ts, line 160

# name

название

Properties:
Type Description
string

View Source core/commander/command.ts, line 36

string

# name

название

Properties:
Type Description
string

View Source core/commander/command.ts, line 126

Record.<string, unknown>

# params

дополнительные параметры

View Source core/commander/command.ts, line 50

Record.<string, unknown>

# params

дополнительные параметры

View Source core/commander/command.ts, line 146

RegExp | string

# pattern

паттерн команды

Properties:
Type Description
RegExp | string

View Source core/commander/command.ts, line 119

# static pattern

паттерн команды

Properties:
Type Description
RegExp | string

View Source core/commander/command.ts, line 31

Methods

# findSubCommand(context) → {Command}

поиск подкоманд

Parameters:
Name Type Description
context Record.<string, unknown>

View Source core/commander/command.ts, line 167

Command