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: ChatImplementations§
Source§impl Group
impl Group
pub fn from_raw(chat: Chat) -> Self
Sourcepub fn id(&self) -> PeerId
pub fn id(&self) -> PeerId
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 title(&self) -> Option<&str>
pub fn title(&self) -> Option<&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 group, 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.