get_my_commands¶
-
template<class Agent>
api_result<array_t<bot_command_t>, Agent&&> get_my_commands(Agent &&agent, get_my_commands_args_t args)¶
-
template<class Agent, class F>
void get_my_commands(Agent &&agent, get_my_commands_args_t args, F &&callback)¶ agent
is any object satisfying agent concept.callback
is any callable object acceptingexpected<array_t<bot_command_t>>
.Use this method to get the current list of the bot’s commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren’t set, an empty list is returned.
-
struct get_my_commands_args_t¶
Arguments that should be passed to
get_my_commands()
.-
optional_t<bot_command_scope_t> scope¶
A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.
-
optional_t<string_t> language_code¶
A two-letter ISO 639-1 language code or an empty string
-
optional_t<bot_command_scope_t> scope¶