Skip to content

export Class

CommandsScopeBuilder ​

extends ​

Builder

Constructor ​

ts
 new CommandsScopeBuilder( type, chat_id, user_id )
ParameterTypeDescription
typeCommandScopeTypeThe type of the scope.
chat_id?string | numberThe id of the chat that is relevant.
user_id?numberThe id of the user that is relevent.

Methods ​

setChat( chat_id ) ​

ParameterTypeDescription
chat_idstring | numberThe id of the chat that is relevant.

Returns: CommandsScopeBuilder

setType( type ) ​

ParameterTypeDescription
typeCommandScopeTypeThe type of the command.

Returns: CommandsScopeBuilder

setUser( user_id ) ​

ParameterTypeDescription
user_idnumberThe id of the user that is relevant.

Returns: CommandsScopeBuilder

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.