pub struct InternalLinkTypeSideMenuBot {
pub bot_username: String,
pub url: String,
}
Expand description
The link is a link to a bot, which can be installed to the side menu. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn’t added to side menu, then show a disclaimer about Mini Apps being a third-party apps, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the bot is added to side menu, then use getWebAppUrl with the given URL and open the returned URL as a Web App
Fields§
§bot_username: String
Username of the bot
url: String
URL to be passed to getWebAppUrl
Trait Implementations§
Source§impl Clone for InternalLinkTypeSideMenuBot
impl Clone for InternalLinkTypeSideMenuBot
Source§fn clone(&self) -> InternalLinkTypeSideMenuBot
fn clone(&self) -> InternalLinkTypeSideMenuBot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InternalLinkTypeSideMenuBot
impl Debug for InternalLinkTypeSideMenuBot
Source§impl Default for InternalLinkTypeSideMenuBot
impl Default for InternalLinkTypeSideMenuBot
Source§fn default() -> InternalLinkTypeSideMenuBot
fn default() -> InternalLinkTypeSideMenuBot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InternalLinkTypeSideMenuBot
impl<'de> Deserialize<'de> for InternalLinkTypeSideMenuBot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for InternalLinkTypeSideMenuBot
Auto Trait Implementations§
impl Freeze for InternalLinkTypeSideMenuBot
impl RefUnwindSafe for InternalLinkTypeSideMenuBot
impl Send for InternalLinkTypeSideMenuBot
impl Sync for InternalLinkTypeSideMenuBot
impl Unpin for InternalLinkTypeSideMenuBot
impl UnwindSafe for InternalLinkTypeSideMenuBot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more