Common
- Description:
Common Interface
- Source:
Namespaces
Methods
(async, static) CommandHandler(interaction)
- Description:
Handles command call
- Source:
Parameters:
Name | Type | Description |
---|---|---|
interaction |
Common.DiscordInteraction | Common.TelegramInteraction | Command interaction |
Type Definitions
CommandArg
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | Argument name |
type |
'string' | Argument type (currently only string) |
description |
string | Argument description |
optional |
boolean |
|
Type:
- object
CommandDefinition
- Description:
Common command definition
- Source:
Properties:
Name | Type | Description |
---|---|---|
command_name |
string | Command name |
args |
Array.<Common.CommandArg> | List of arguments acceptable by command |
limit |
number | Argument limit Common.Telegram.commonizeContext |
is_inline |
boolean |
|
description |
string | Command description |
Common command definition
Type:
- object
DiscordInteraction
- Source:
Properties:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
platform |
'discord' | Interaction source platform |
|||||||||||||||||||||||||
command_name |
string |
<nullable> |
Command name |
||||||||||||||||||||||||
text |
string | Command input as one line |
|||||||||||||||||||||||||
args |
Array.<string> |
<nullable> |
Array of command args |
||||||||||||||||||||||||
from |
object | Sender info Properties
|
|||||||||||||||||||||||||
space |
object | Info about the entity where command was triggered Properties
|
|||||||||||||||||||||||||
id |
string | Interaction id |
|||||||||||||||||||||||||
data |
string |
<nullable> |
Callback query data |
Type:
- object
TelegramInteraction
- Source:
Properties:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
platform |
'telegram' | Interaction source platform |
|||||||||||||||||||||||||
command_name |
string |
<nullable> |
Command name |
||||||||||||||||||||||||
text |
string | Command input as one line |
|||||||||||||||||||||||||
args |
Array.<string> |
<nullable> |
Array of command args |
||||||||||||||||||||||||
from |
object | Sender info Properties
|
|||||||||||||||||||||||||
space |
object | Info about the entity where command was triggered Properties
|
|||||||||||||||||||||||||
id |
string | Interaction id |
|||||||||||||||||||||||||
data |
string |
<nullable> |
Callback query data |
Type:
- object