CommandSeparator

CommandSeparator

Seperates a message text into all parts of a Telegram command.

Constructor

new CommandSeparator()

Properties:
Name Type Description
valid boolean

Is the message text a valid Command? If false, all other params do not exist.

text string

Whole message, equal to the constructor's param

command string

Command, e.g. in '/help test' -> 'help'

bot string

The mentioned bot, e.g. in '/echo@sk22testbot' -> 'sk22testbot'

args string

Command's args, e.g. in '/help test' -> 'test'

Source: