pub struct InternalLinkTypeAttachmentMenuBot {
pub target_chat: TargetChat,
pub bot_username: String,
pub url: String,
}
Expand description
The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. Then, 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 attachment 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 attachment menu bot can’t be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL
Fields§
§target_chat: TargetChat
Target chat to be opened
bot_username: String
Username of the bot
url: String
URL to be passed to openWebApp
Trait Implementations§
Source§impl Clone for InternalLinkTypeAttachmentMenuBot
impl Clone for InternalLinkTypeAttachmentMenuBot
Source§fn clone(&self) -> InternalLinkTypeAttachmentMenuBot
fn clone(&self) -> InternalLinkTypeAttachmentMenuBot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for InternalLinkTypeAttachmentMenuBot
impl<'de> Deserialize<'de> for InternalLinkTypeAttachmentMenuBot
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>,
Source§impl PartialEq for InternalLinkTypeAttachmentMenuBot
impl PartialEq for InternalLinkTypeAttachmentMenuBot
Source§fn eq(&self, other: &InternalLinkTypeAttachmentMenuBot) -> bool
fn eq(&self, other: &InternalLinkTypeAttachmentMenuBot) -> bool
self
and other
values to be equal, and is used by ==
.