Struct AttachmentMenuBot

Source
pub struct AttachmentMenuBot {
Show 23 fields pub bot_user_id: i64, pub supports_self_chat: bool, pub supports_user_chats: bool, pub supports_bot_chats: bool, pub supports_group_chats: bool, pub supports_channel_chats: bool, pub request_write_access: bool, pub is_added: bool, pub show_in_attachment_menu: bool, pub show_in_side_menu: bool, pub show_disclaimer_in_side_menu: bool, pub name: String, pub name_color: Option<AttachmentMenuBotColor>, pub default_icon: Option<File>, pub ios_static_icon: Option<File>, pub ios_animated_icon: Option<File>, pub ios_side_menu_icon: Option<File>, pub android_icon: Option<File>, pub android_side_menu_icon: Option<File>, pub macos_icon: Option<File>, pub macos_side_menu_icon: Option<File>, pub icon_color: Option<AttachmentMenuBotColor>, pub web_app_placeholder: Option<File>,
}
Expand description

Represents a bot, which can be added to attachment or side menu

Fields§

§bot_user_id: i64

User identifier of the bot

§supports_self_chat: bool

True, if the bot supports opening from attachment menu in the chat with the bot

§supports_user_chats: bool

True, if the bot supports opening from attachment menu in private chats with ordinary users

§supports_bot_chats: bool

True, if the bot supports opening from attachment menu in private chats with other bots

§supports_group_chats: bool

True, if the bot supports opening from attachment menu in basic group and supergroup chats

§supports_channel_chats: bool

True, if the bot supports opening from attachment menu in channel chats

§request_write_access: bool

True, if the user must be asked for the permission to send messages to the bot

§is_added: bool

True, if the bot was explicitly added by the user. If the bot isn’t added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be added or removed

§show_in_attachment_menu: bool

True, if the bot must be shown in the attachment menu

§show_in_side_menu: bool

True, if the bot must be shown in the side menu

§show_disclaimer_in_side_menu: bool

True, if a disclaimer, why the bot is shown in the side menu, is needed

§name: String

Name for the bot in attachment menu

§name_color: Option<AttachmentMenuBotColor>

Color to highlight selected name of the bot if appropriate; may be null

§default_icon: Option<File>

Default icon for the bot in SVG format; may be null

§ios_static_icon: Option<File>

Icon for the bot in SVG format for the official iOS app; may be null

§ios_animated_icon: Option<File>

Icon for the bot in TGS format for the official iOS app; may be null

§ios_side_menu_icon: Option<File>

Icon for the bot in PNG format for the official iOS app side menu; may be null

§android_icon: Option<File>

Icon for the bot in TGS format for the official Android app; may be null

§android_side_menu_icon: Option<File>

Icon for the bot in SVG format for the official Android app side menu; may be null

§macos_icon: Option<File>

Icon for the bot in TGS format for the official native macOS app; may be null

§macos_side_menu_icon: Option<File>

Icon for the bot in PNG format for the official macOS app side menu; may be null

§icon_color: Option<AttachmentMenuBotColor>

Color to highlight selected icon of the bot if appropriate; may be null

§web_app_placeholder: Option<File>

Default placeholder for opened Web Apps in SVG format; may be null

Trait Implementations§

Source§

impl Clone for AttachmentMenuBot

Source§

fn clone(&self) -> AttachmentMenuBot

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 AttachmentMenuBot

Source§

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

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

impl Default for AttachmentMenuBot

Source§

fn default() -> AttachmentMenuBot

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AttachmentMenuBot

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 AttachmentMenuBot

Source§

fn eq(&self, other: &AttachmentMenuBot) -> 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 AttachmentMenuBot

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 AttachmentMenuBot

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>,