2023-04-16 22:12:28 +02:00
|
|
|
//
|
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
|
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#pragma once
|
|
|
|
|
2023-04-16 22:25:52 +02:00
|
|
|
#include "td/telegram/DialogParticipant.h"
|
|
|
|
#include "td/telegram/UserId.h"
|
|
|
|
|
2023-04-16 22:12:28 +02:00
|
|
|
#include "td/actor/actor.h"
|
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2023-04-16 22:25:52 +02:00
|
|
|
#include "td/utils/Promise.h"
|
2023-04-16 22:12:28 +02:00
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
class Td;
|
|
|
|
|
|
|
|
class BotInfoManager final : public Actor {
|
|
|
|
public:
|
|
|
|
BotInfoManager(Td *td, ActorShared<> parent);
|
|
|
|
|
2023-04-16 22:25:52 +02:00
|
|
|
void set_default_group_administrator_rights(AdministratorRights administrator_rights, Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void set_default_channel_administrator_rights(AdministratorRights administrator_rights, Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void set_bot_name(UserId bot_user_id, const string &language_code, const string &name, Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void get_bot_name(UserId bot_user_id, const string &language_code, Promise<string> &&promise);
|
|
|
|
|
|
|
|
void set_bot_info_description(UserId bot_user_id, const string &language_code, const string &description,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void get_bot_info_description(UserId bot_user_id, const string &language_code, Promise<string> &&promise);
|
|
|
|
|
|
|
|
void set_bot_info_about(UserId bot_user_id, const string &language_code, const string &about,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void get_bot_info_about(UserId bot_user_id, const string &language_code, Promise<string> &&promise);
|
|
|
|
|
2023-04-16 22:12:28 +02:00
|
|
|
private:
|
|
|
|
void tear_down() final;
|
|
|
|
|
|
|
|
Td *td_;
|
|
|
|
ActorShared<> parent_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace td
|