Skip to main content

BotInfo

Struct BotInfo 

Source
pub struct BotInfo {
Show 22 fields pub short_description: String, pub description: String, pub photo: Option<Photo>, pub animation: Option<Animation>, pub menu_button: Option<BotMenuButton>, pub commands: Vec<BotCommand>, pub privacy_policy_url: String, pub default_group_administrator_rights: Option<ChatAdministratorRights>, pub default_channel_administrator_rights: Option<ChatAdministratorRights>, pub affiliate_program: Option<AffiliateProgramInfo>, pub web_app_background_light_color: i32, pub web_app_background_dark_color: i32, pub web_app_header_light_color: i32, pub web_app_header_dark_color: i32, pub verification_parameters: Option<BotVerificationParameters>, pub can_get_revenue_statistics: bool, pub can_manage_emoji_status: bool, pub has_media_previews: bool, pub edit_commands_link: Option<InternalLinkType>, pub edit_description_link: Option<InternalLinkType>, pub edit_description_media_link: Option<InternalLinkType>, pub edit_settings_link: Option<InternalLinkType>,
}
Expand description

Contains information about a bot

Fields§

§short_description: String

The text that is shown on the bot’s profile page and is sent together with the link when users share the bot

§description: String

The text shown in the chat with the bot if the chat is empty

§photo: Option<Photo>

Photo shown in the chat with the bot if the chat is empty; may be null

§animation: Option<Animation>

Animation shown in the chat with the bot if the chat is empty; may be null

§menu_button: Option<BotMenuButton>

Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown

§commands: Vec<BotCommand>

List of the bot commands

§privacy_policy_url: String

The HTTP link to the privacy policy of the bot. If empty, then /privacy command must be used if supported by the bot. If the command isn’t supported, then https:telegram.org/privacy-tpa must be opened

§default_group_administrator_rights: Option<ChatAdministratorRights>

Default administrator rights for adding the bot to basic group and supergroup chats; may be null

§default_channel_administrator_rights: Option<ChatAdministratorRights>

Default administrator rights for adding the bot to channels; may be null

§affiliate_program: Option<AffiliateProgramInfo>

Information about the affiliate program of the bot; may be null if none

§web_app_background_light_color: i32

Default light background color for bot Web Apps; -1 if not specified

§web_app_background_dark_color: i32

Default dark background color for bot Web Apps; -1 if not specified

§web_app_header_light_color: i32

Default light header color for bot Web Apps; -1 if not specified

§web_app_header_dark_color: i32

Default dark header color for bot Web Apps; -1 if not specified

§verification_parameters: Option<BotVerificationParameters>

Parameters of the verification that can be provided by the bot; may be null if none or the current user isn’t the owner of the bot

§can_get_revenue_statistics: bool

True, if the bot’s revenue statistics are available to the current user

§can_manage_emoji_status: bool

True, if the bot can manage emoji status of the current user

§has_media_previews: bool

True, if the bot has media previews

§edit_commands_link: Option<InternalLinkType>

The internal link, which can be used to edit bot commands; may be null

§edit_description_link: Option<InternalLinkType>

The internal link, which can be used to edit bot description; may be null

§edit_description_media_link: Option<InternalLinkType>

The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null

§edit_settings_link: Option<InternalLinkType>

The internal link, which can be used to edit bot settings; may be null

Trait Implementations§

Source§

impl Clone for BotInfo

Source§

fn clone(&self) -> BotInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BotInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BotInfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for BotInfo

Source§

fn eq(&self, other: &BotInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for BotInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BotInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,