Struct tgbot::types::ChannelChat
source · pub struct ChannelChat {Show 18 fields
pub id: ChatPeerId,
pub title: String,
pub accent_color: Option<AccentColor>,
pub active_usernames: Option<Vec<String>>,
pub available_reactions: Option<Vec<ReactionType>>,
pub background_custom_emoji_id: Option<String>,
pub description: Option<String>,
pub emoji_status_custom_emoji_id: Option<String>,
pub emoji_status_expiration_date: Option<Integer>,
pub has_protected_content: Option<bool>,
pub invite_link: Option<String>,
pub linked_chat_id: Option<Integer>,
pub message_auto_delete_time: Option<Integer>,
pub photo: Option<ChatPhoto>,
pub pinned_message: Option<Box<Message>>,
pub profile_accent_color: Option<ProfileAccentColor>,
pub profile_background_custom_emoji_id: Option<String>,
pub username: Option<ChatUsername>,
}
Expand description
Represents a channel chat.
Fields§
§id: ChatPeerId
Unique identifier of the channel.
title: String
Title of the channel.
accent_color: Option<AccentColor>
Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview.
Returned only in crate::types::GetChat
.
active_usernames: Option<Vec<String>>
List of all active channel usernames.
Returned only in crate::types::GetChat
.
available_reactions: Option<Vec<ReactionType>>
List of available reactions allowed in the chat.
If omitted, then all emoji reactions are allowed.
Returned only in crate::types::GetChat
.
background_custom_emoji_id: Option<String>
Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background.
Returned only in crate::types::GetChat
.
description: Option<String>
Description of the channel.
Returned only in crate::types::GetChat
.
emoji_status_custom_emoji_id: Option<String>
Custom emoji identifier of emoji status.
Returned only in crate::types::GetChat
.
emoji_status_expiration_date: Option<Integer>
Expiration date of the emoji status of in Unix time, if any.
Returned only in crate::types::GetChat
.
has_protected_content: Option<bool>
Indicates whether messages from the channel can’t be forwarded to other chats.
Returned only in crate::types::GetChat
.
invite_link: Option<String>
Invite link for the channel.
Returned only in crate::types::GetChat
.
linked_chat_id: Option<Integer>
Unique identifier of a linked discussion group.
Returned only in crate::types::GetChat
.
message_auto_delete_time: Option<Integer>
The time after which all messages sent to the channel will be automatically deleted; in seconds.
Returned only in crate::types::GetChat
.
photo: Option<ChatPhoto>
Photo associated with the channel.
Returned only in crate::types::GetChat
.
pinned_message: Option<Box<Message>>
Latest pinned message in the channel.
Returned only in crate::types::GetChat
.
profile_accent_color: Option<ProfileAccentColor>
Identifier of the accent color for the chat’s profile background.
Returned only in crate::types::GetChat
.
profile_background_custom_emoji_id: Option<String>
Custom emoji identifier of the emoji chosen by the chat for its profile background.
Returned only in crate::types::GetChat
.
username: Option<ChatUsername>
Username of the channel.
Implementations§
source§impl ChannelChat
impl ChannelChat
sourcepub fn new<A, B>(id: A, title: B) -> Self
pub fn new<A, B>(id: A, title: B) -> Self
Creates a new ChannelChat
.
§Arguments
id
- Unique identifier of the channel.title
- Title of the channel.
sourcepub fn with_accent_color(self, value: AccentColor) -> Self
pub fn with_accent_color(self, value: AccentColor) -> Self
sourcepub fn with_active_usernames<A, B>(self, value: A) -> Self
pub fn with_active_usernames<A, B>(self, value: A) -> Self
sourcepub fn with_available_reactions<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = ReactionType>,
pub fn with_available_reactions<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = ReactionType>,
sourcepub fn with_background_custom_emoji_id<T>(self, value: T) -> Self
pub fn with_background_custom_emoji_id<T>(self, value: T) -> Self
Sets a new custom emoji identifier for the message background.
§Arguments
value
- Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background.
sourcepub fn with_description<T>(self, value: T) -> Self
pub fn with_description<T>(self, value: T) -> Self
sourcepub fn with_emoji_status_custom_emoji_id<T>(self, value: T) -> Self
pub fn with_emoji_status_custom_emoji_id<T>(self, value: T) -> Self
sourcepub fn with_emoji_status_expiration_date(self, value: Integer) -> Self
pub fn with_emoji_status_expiration_date(self, value: Integer) -> Self
sourcepub fn with_has_protected_content(self, value: bool) -> Self
pub fn with_has_protected_content(self, value: bool) -> Self
Sets a new value for a has_protected_content
flag.
§Arguments
value
- Indicates whether messages from the chat can’t be forwarded to other chats.
sourcepub fn with_invite_link<T>(self, value: T) -> Self
pub fn with_invite_link<T>(self, value: T) -> Self
sourcepub fn with_linked_chat_id(self, value: Integer) -> Self
pub fn with_linked_chat_id(self, value: Integer) -> Self
sourcepub fn with_message_auto_delete_time(self, value: Integer) -> Self
pub fn with_message_auto_delete_time(self, value: Integer) -> Self
Sets a new message auto-delete time.
§Arguments
value
- Value in seconds after which all messages sent to the chat will be automatically deleted.
sourcepub fn with_photo(self, value: ChatPhoto) -> Self
pub fn with_photo(self, value: ChatPhoto) -> Self
sourcepub fn with_pinned_message(self, value: Message) -> Self
pub fn with_pinned_message(self, value: Message) -> Self
sourcepub fn with_profile_accent_color(self, value: ProfileAccentColor) -> Self
pub fn with_profile_accent_color(self, value: ProfileAccentColor) -> Self
sourcepub fn with_profile_background_custom_emoji_id<T>(self, value: T) -> Self
pub fn with_profile_background_custom_emoji_id<T>(self, value: T) -> Self
Sets a new custom emoji identifer for the chat’s profile background.
§Arguments
value
- Custom emoji identifier of the emoji chosen by the chat for its profile background.
sourcepub fn with_username<T>(self, value: T) -> Selfwhere
T: Into<ChatUsername>,
pub fn with_username<T>(self, value: T) -> Selfwhere
T: Into<ChatUsername>,
Trait Implementations§
source§impl Clone for ChannelChat
impl Clone for ChannelChat
source§fn clone(&self) -> ChannelChat
fn clone(&self) -> ChannelChat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChannelChat
impl Debug for ChannelChat
source§impl<'de> Deserialize<'de> for ChannelChat
impl<'de> Deserialize<'de> for ChannelChat
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 From<ChannelChat> for Chat
impl From<ChannelChat> for Chat
source§fn from(original: ChannelChat) -> Chat
fn from(original: ChannelChat) -> Chat
source§impl PartialEq for ChannelChat
impl PartialEq for ChannelChat
source§fn eq(&self, other: &ChannelChat) -> bool
fn eq(&self, other: &ChannelChat) -> bool
self
and other
values to be equal, and is used
by ==
.