diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 19c4a1436..727a48310 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -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 botCommand command:string description:string = BotCommand; -//@description Contains a list of bot commands @commands List of bot commands -botCommands commands:vector = BotCommands; +//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands +botCommands bot_user_id:int32 commands:vector = BotCommands; //@description Provides information about a bot and its supported commands @commands A list of commands supported by the bot botInfo commands:vector = BotInfo; diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index d815e0a2b..e81fd3997 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -1033,7 +1033,9 @@ class GetBotCommandsQuery : public Td::ResultHandler { auto commands = transform(result_ptr.move_as_ok(), [](auto &&command) { return td_api::make_object(command->command_, command->description_); }); - promise_.set_value(td_api::make_object(std::move(commands))); + promise_.set_value(td_api::make_object( + 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 {