pub struct Group {
pub raw: Chat,
}
Expand description
A group chat.
Telegram’s API internally distinguishes between “small group chats” and “megagroups”, also known as “supergroups” in the UI of Telegram applications.
Small group chats are the default, and offer less features than megagroups, but you can join more of them. Certain actions in official clients, like setting a chat’s username, silently upgrade the chat to a megagroup.
Fields§
§raw: Chat
Implementations§
Source§impl Group
impl Group
pub fn from_raw(chat: Chat) -> Self
Sourcepub fn id(&self) -> i64
pub fn id(&self) -> i64
Return the unique identifier for this group.
Note that if this group is migrated to a megagroup, both this group and the new one will exist as separate chats, with different identifiers.
Sourcepub fn pack(&self) -> PackedChat
pub fn pack(&self) -> PackedChat
Pack this group into a smaller representation that can be loaded later.
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Return the title of this group.
The title may be the empty string if the group is not accessible.
Sourcepub fn username(&self) -> Option<&str>
pub fn username(&self) -> Option<&str>
Return the public @username of this group, if any.
The returned username does not contain the “@” prefix.
Outside of the application, people may link to this user with one of Telegram’s URLs, such as https://t.me/username.
Sourcepub fn usernames(&self) -> Vec<&str>
pub fn usernames(&self) -> Vec<&str>
Return collectible usernames of this chat, if any.
The returned usernames do not contain the “@” prefix.
Outside of the application, people may link to this user with one of its username, such as https://t.me/username.
pub fn photo(&self) -> Option<&ChatPhoto>
Sourcepub fn is_megagroup(&self) -> bool
pub fn is_megagroup(&self) -> bool
Returns true if this group is a megagroup (also known as supergroups).
In case inner type of group is Channel, that means it’s a megagroup.