pub struct InternalLinkTypeBotAddToChannel {
pub bot_username: String,
pub administrator_rights: ChatAdministratorRights,
}
Expand description
The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
Fields§
§bot_username: String
Username of the bot
administrator_rights: ChatAdministratorRights
Expected administrator rights for the bot
Trait Implementations§
Source§impl Clone for InternalLinkTypeBotAddToChannel
impl Clone for InternalLinkTypeBotAddToChannel
Source§fn clone(&self) -> InternalLinkTypeBotAddToChannel
fn clone(&self) -> InternalLinkTypeBotAddToChannel
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 Default for InternalLinkTypeBotAddToChannel
impl Default for InternalLinkTypeBotAddToChannel
Source§fn default() -> InternalLinkTypeBotAddToChannel
fn default() -> InternalLinkTypeBotAddToChannel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InternalLinkTypeBotAddToChannel
impl<'de> Deserialize<'de> for InternalLinkTypeBotAddToChannel
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
Source§impl PartialEq for InternalLinkTypeBotAddToChannel
impl PartialEq for InternalLinkTypeBotAddToChannel
Source§fn eq(&self, other: &InternalLinkTypeBotAddToChannel) -> bool
fn eq(&self, other: &InternalLinkTypeBotAddToChannel) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for InternalLinkTypeBotAddToChannel
Auto Trait Implementations§
impl Freeze for InternalLinkTypeBotAddToChannel
impl RefUnwindSafe for InternalLinkTypeBotAddToChannel
impl Send for InternalLinkTypeBotAddToChannel
impl Sync for InternalLinkTypeBotAddToChannel
impl Unpin for InternalLinkTypeBotAddToChannel
impl UnwindSafe for InternalLinkTypeBotAddToChannel
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