pub struct Bot {Show 13 fields
pub first_name: String,
pub id: Integer,
pub username: String,
pub allows_users_to_create_topics: bool,
pub can_connect_to_business: bool,
pub can_join_groups: bool,
pub can_manage_bots: bool,
pub can_read_all_group_messages: bool,
pub has_main_web_app: bool,
pub has_topics_enabled: bool,
pub last_name: Option<String>,
pub supports_guest_queries: bool,
pub supports_inline_queries: bool,
}Expand description
Represents information about a bot returned in GetBot.
Fields§
§first_name: StringThe first name of the bot.
id: IntegerThe unique identifier for the bot.
username: StringThe username of the bot.
allows_users_to_create_topics: boolWhether the bot allows users to create and delete topics in private chats.
can_connect_to_business: boolWhether the bot can be connected to a Telegram Business account to receive its messages.
can_join_groups: boolIndicates whether the bot can be invited to groups.
can_manage_bots: boolWhether other bots can be created to be controlled by the bot.
can_read_all_group_messages: boolIndicates whether privacy mode is disabled, allowing the bot to read all group messages.
has_main_web_app: boolIndicates whether the bot has a main Web App.
has_topics_enabled: boolIndicates whether the bot has forum topic mode enabled in private chats.
last_name: Option<String>The last name of the bot.
supports_guest_queries: boolIndicates whether the bot supports guest queries from chats it is not a member of.
supports_inline_queries: boolIndicates whether the bot supports inline queries.
Implementations§
Source§impl Bot
impl Bot
Sourcepub fn new<A, B>(id: Integer, username: A, first_name: B) -> Self
pub fn new<A, B>(id: Integer, username: A, first_name: B) -> Self
Creates a new Bot.
§Arguments
id- The unique identifier for the bot.username- The username of the bot.first_name- The first name of the bot.
Sourcepub fn with_allows_users_to_create_topics(self, value: bool) -> Self
pub fn with_allows_users_to_create_topics(self, value: bool) -> Self
Sets a new value for the allows_users_to_create_topics flag.
§Arguments
value- Whether the bot allows users to create and delete topics in private chats.
Sourcepub fn with_can_connect_to_business(self, value: bool) -> Self
pub fn with_can_connect_to_business(self, value: bool) -> Self
Sets a new value for the can_connect_to_business flag.
§Arguments
value- Whether the bot can be connected to a Telegram Business account.
Sourcepub fn with_can_join_groups(self, value: bool) -> Self
pub fn with_can_join_groups(self, value: bool) -> Self
Sets a new value for the can_join_groups flag.
§Arguments
value- Indicates whether the bot can be invited to groups.
Sourcepub fn with_can_manage_bots(self, value: bool) -> Self
pub fn with_can_manage_bots(self, value: bool) -> Self
Sets a new value for the can_manage_bots flag.
§Arguments
value- Whether other bots can be created to be controlled by the bot.
Sourcepub fn with_can_read_all_group_messages(self, value: bool) -> Self
pub fn with_can_read_all_group_messages(self, value: bool) -> Self
Sets a new value for the can_read_all_group_messages flag.
§Arguments
value- Indicates whether privacy mode is disabled.
Sourcepub fn with_has_main_web_app(self, value: bool) -> Self
pub fn with_has_main_web_app(self, value: bool) -> Self
Sets a new value for the has_main_web_app flag.
§Arguments
value- Indicates whether the bot has a main Web App.
Sourcepub fn with_has_topics_enabled(self, value: bool) -> Self
pub fn with_has_topics_enabled(self, value: bool) -> Self
Sets a new value for the has_topics_enabled flag.
§Arguments
value- Indicates whether the bot has forum topic mode enabled in private chats.
Sourcepub fn with_last_name<T>(self, value: T) -> Self
pub fn with_last_name<T>(self, value: T) -> Self
Sourcepub fn with_supports_guest_queries(self, value: bool) -> Self
pub fn with_supports_guest_queries(self, value: bool) -> Self
Sets a new value for the supports_guest_queries flag.
§Arguments
value- Indicates whether the bot supports guest queries.
Sourcepub fn with_supports_inline_queries(self, value: bool) -> Self
pub fn with_supports_inline_queries(self, value: bool) -> Self
Sets a new value for the supports_inline_queries flag.
§Arguments
value- Indicates whether the bot supports inline queries.