class
Hamilton::Types::BotCommand
- Hamilton::Types::BotCommand
- Reference
- Object
Overview
This object represents a bot command.
The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned: Commands in the chat with the bot:
- botCommandScopeChat + language_code
- botCommandScopeChat
- botCommandScopeAllPrivateChats + language_code
- botCommandScopeAllPrivateChats
- botCommandScopeDefault + language_code
- botCommandScopeDefault
Commands in group and supergroup chats:
- botCommandScopeChatMember + language_code
- botCommandScopeChatMember
- botCommandScopeChatAdministrators + language_code (administrators only)
- botCommandScopeChatAdministrators (administrators only)
- botCommandScopeChat + language_code
- botCommandScopeChat
- botCommandScopeAllChatAdministrators + language_code (administrators only)
- botCommandScopeAllChatAdministrators (administrators only)
- botCommandScopeAllGroupChats + language_code
- botCommandScopeAllGroupChats
- botCommandScopeDefault + language_code
- botCommandScopeDefault
Included Modules
- Hamilton::Types::Common
- JSON::Serializable
Defined in:
types/bot_command.crConstructors
- .new(pull : JSON::PullParser)
- .new(params)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(**params)
Instance Method Summary
-
#command : String
Text of the command; 1-32 characters.
-
#command=(command : String)
Text of the command; 1-32 characters.
-
#description : String
Description of the command; 1-256 characters.
-
#description=(description : String)
Description of the command; 1-256 characters.
-
#non_nil_fields : Array(String)
List of available non-nil fields.
-
#non_nil_fields=(non_nil_fields : Array(String))
List of available non-nil fields.
Instance methods inherited from class Reference
==(other : Hamilton::Any)
==
Instance methods inherited from class Object
===(other : Hamilton::Any)
===
Constructor Detail
Instance Method Detail
def command : String
#
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
def command=(command : String)
#
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.