Add bot_user_id to botCommands.
This commit is contained in:
parent
29b491dcd4
commit
37d10c0be4
@ -350,8 +350,8 @@ userTypeUnknown = UserType;
|
|||||||
//@description Represents a command supported by a bot @command Text of the bot command @param_description Description of the bot command
|
//@description Represents a command supported by a bot @command Text of the bot command @param_description Description of the bot command
|
||||||
botCommand command:string description:string = BotCommand;
|
botCommand command:string description:string = BotCommand;
|
||||||
|
|
||||||
//@description Contains a list of bot commands @commands List of bot commands
|
//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands
|
||||||
botCommands commands:vector<botCommand> = BotCommands;
|
botCommands bot_user_id:int32 commands:vector<botCommand> = BotCommands;
|
||||||
|
|
||||||
//@description Provides information about a bot and its supported commands @commands A list of commands supported by the bot
|
//@description Provides information about a bot and its supported commands @commands A list of commands supported by the bot
|
||||||
botInfo commands:vector<botCommand> = BotInfo;
|
botInfo commands:vector<botCommand> = BotInfo;
|
||||||
|
@ -1033,7 +1033,9 @@ class GetBotCommandsQuery : public Td::ResultHandler {
|
|||||||
auto commands = transform(result_ptr.move_as_ok(), [](auto &&command) {
|
auto commands = transform(result_ptr.move_as_ok(), [](auto &&command) {
|
||||||
return td_api::make_object<td_api::botCommand>(command->command_, command->description_);
|
return td_api::make_object<td_api::botCommand>(command->command_, command->description_);
|
||||||
});
|
});
|
||||||
promise_.set_value(td_api::make_object<td_api::botCommands>(std::move(commands)));
|
promise_.set_value(td_api::make_object<td_api::botCommands>(
|
||||||
|
td->contacts_manager_->get_user_id_object(td->contacts_manager_->get_my_id(), "GetBotCommandsQuery"),
|
||||||
|
std::move(commands)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_error(uint64 id, Status status) override {
|
void on_error(uint64 id, Status status) override {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user