Struct tgbot::types::SupergroupChat
source · pub struct SupergroupChat {Show 31 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 can_set_sticker_set: Option<bool>,
pub custom_emoji_sticker_set_name: Option<String>,
pub description: Option<String>,
pub emoji_status_custom_emoji_id: Option<String>,
pub emoji_status_expiration_date: Option<Integer>,
pub has_aggressive_anti_spam_enabled: Option<bool>,
pub has_hidden_members: Option<bool>,
pub has_protected_content: Option<bool>,
pub has_visible_history: Option<bool>,
pub invite_link: Option<String>,
pub is_forum: Option<bool>,
pub join_by_request: Option<bool>,
pub join_to_send_messages: Option<bool>,
pub linked_chat_id: Option<Integer>,
pub location: Option<ChatLocation>,
pub message_auto_delete_time: Option<Integer>,
pub permissions: Option<ChatPermissions>,
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 slow_mode_delay: Option<Integer>,
pub sticker_set_name: Option<String>,
pub unrestrict_boost_count: Option<Integer>,
pub username: Option<ChatUsername>,
}
Expand description
Represents a supergroup chat.
Fields§
§id: ChatPeerId
Unique identifier of the supergroup.
title: String
Title of the supergroup.
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 supergroup 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
.
can_set_sticker_set: Option<bool>
Indicates whether the bot can change the supergroup sticker set.
Returned only in crate::types::GetChat
.
custom_emoji_sticker_set_name: Option<String>
The name of the group’s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
Returned only in crate::types::GetChat
.
description: Option<String>
Description of the supergroup.
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_aggressive_anti_spam_enabled: Option<bool>
Indicates whether aggressive anti-spam checks are enabled in the supergroup.
The field is only available to chat administrators.
Returned only in crate::types::GetChat
.
Indicates whether non-administrators can only get the list of bots and administrators in the supergroup.
Returned only in crate::types::GetChat
.
has_protected_content: Option<bool>
Indicates whether messages from the supergroup can’t be forwarded to other chats.
Returned only in crate::types::GetChat
.
has_visible_history: Option<bool>
Whether new chat members will have access to old messages; available only to chat administrators.
Returned only in crate::types::GetChat
.
invite_link: Option<String>
Invite link for the supergroup.
Returned only in crate::types::GetChat
.
is_forum: Option<bool>
Indicates whether the supergroup is a forum (has topics enabled).
join_by_request: Option<bool>
Indicates whether all users directly joining the supergroup need to be approved by administrators.
Returned only in crate::types::GetChat
.
join_to_send_messages: Option<bool>
Indicates whether users need to join the supergroup before they can send messages.
Returned only in crate::types::GetChat
.
linked_chat_id: Option<Integer>
Unique identifier of the linked channel.
Returned only in crate::types::GetChat
.
location: Option<ChatLocation>
The location to which the supergroup is connected.
Returned only in crate::types::GetChat
.
message_auto_delete_time: Option<Integer>
The time after which all messages sent to the supergroup will be automatically deleted; in seconds.
Returned only in crate::types::GetChat
.
permissions: Option<ChatPermissions>
Default supergroup member permissions.
Returned only in crate::types::GetChat
.
photo: Option<ChatPhoto>
Photo associated with the supergroup.
Returned only in crate::types::GetChat
.
pinned_message: Option<Box<Message>>
Latest pinned message in the supergroup.
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
.
slow_mode_delay: Option<Integer>
The minimum allowed delay between consecutive messages sent by each unprivileged user.
Returned only in crate::types::GetChat
.
sticker_set_name: Option<String>
Name of supergroup sticker set.
Returned only in crate::types::GetChat
.
unrestrict_boost_count: Option<Integer>
The minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions.
Returned only in crate::types::GetChat
.
username: Option<ChatUsername>
Username of the supergroup.
Implementations§
source§impl SupergroupChat
impl SupergroupChat
sourcepub fn new<A, B>(id: A, title: B) -> Self
pub fn new<A, B>(id: A, title: B) -> Self
Creates a new SupergroupChat
.
§Arguments
id
- Unique identifier of the supergroup.title
- Title of the supergroup.
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_can_set_sticker_set(self, value: bool) -> Self
pub fn with_can_set_sticker_set(self, value: bool) -> Self
Sets a value for a can_set_sticker_set
flag.
§Arguments
value
- Indicates whether the bot can change the supergroup sticker set.
sourcepub fn with_custom_emoji_sticker_set_name<T>(self, value: T) -> Self
pub fn with_custom_emoji_sticker_set_name<T>(self, value: T) -> Self
Sets a new custom emoji sticker set name
§Arguments
value
- Name of of the group’s custom emoji sticker set.
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_aggressive_anti_spam_enabled(self, value: bool) -> Self
pub fn with_has_aggressive_anti_spam_enabled(self, value: bool) -> Self
Sets a new value for a has_aggressive_anti_spam_enabled
flag.
§Arguments
value
- Indicates whether aggressive anti-spam checks are enabled in the supergroup.
Sets a new value for a has_hidden_members
flag.
§Arguments
value
- Indicates whether non-administrators can only get the list of bots and administrators in the supergroup.
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_has_visible_history(self, value: bool) -> Self
pub fn with_has_visible_history(self, value: bool) -> Self
Sets a new value for a has_visible_history
flag.
§Arguments
value
- Indicates whether new chat members will have access to old messages; available only to chat administrators.
sourcepub fn with_invite_link<T>(self, value: T) -> Self
pub fn with_invite_link<T>(self, value: T) -> Self
sourcepub fn with_is_forum(self, value: bool) -> Self
pub fn with_is_forum(self, value: bool) -> Self
Sets a new value for an is_forum
flag.
§Arguments
value
- Indicates whether the supergroup is a forum (has topics enabled).
sourcepub fn with_join_by_request(self, value: bool) -> Self
pub fn with_join_by_request(self, value: bool) -> Self
Sets a new value for a join_by_request
flag.
§Arguments
value
- Indicates whether all users directly joining the supergroup need to be approved by administrators.
sourcepub fn with_join_to_send_messages(self, value: bool) -> Self
pub fn with_join_to_send_messages(self, value: bool) -> Self
Sets a new value for a join_to_send_messages
flag.
§Arguments
value
- Indicates whether users need to join the supergroup before they can send messages.
sourcepub fn with_linked_chat_id(self, value: Integer) -> Self
pub fn with_linked_chat_id(self, value: Integer) -> Self
sourcepub fn with_location(self, value: ChatLocation) -> Self
pub fn with_location(self, value: ChatLocation) -> Self
sourcepub fn with_message_auto_delete_time(self, value: Integer) -> Self
pub fn with_message_auto_delete_time(self, value: Integer) -> Self
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_permissions(self, value: ChatPermissions) -> Self
pub fn with_permissions(self, value: ChatPermissions) -> 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_slow_mode_delay(self, value: Integer) -> Self
pub fn with_slow_mode_delay(self, value: Integer) -> Self
sourcepub fn with_sticker_set_name<T>(self, value: T) -> Self
pub fn with_sticker_set_name<T>(self, value: T) -> Self
sourcepub fn with_unrestrict_boost_count(self, value: Integer) -> Self
pub fn with_unrestrict_boost_count(self, value: Integer) -> Self
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 SupergroupChat
impl Clone for SupergroupChat
source§fn clone(&self) -> SupergroupChat
fn clone(&self) -> SupergroupChat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SupergroupChat
impl Debug for SupergroupChat
source§impl<'de> Deserialize<'de> for SupergroupChat
impl<'de> Deserialize<'de> for SupergroupChat
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<SupergroupChat> for Chat
impl From<SupergroupChat> for Chat
source§fn from(original: SupergroupChat) -> Chat
fn from(original: SupergroupChat) -> Chat
source§impl PartialEq for SupergroupChat
impl PartialEq for SupergroupChat
source§fn eq(&self, other: &SupergroupChat) -> bool
fn eq(&self, other: &SupergroupChat) -> bool
self
and other
values to be equal, and is used
by ==
.