pub struct Channel {
pub raw: Channel,
}
Expand description
A broadcast channel.
In a broadcast channel, only administrators can broadcast messages to all the subscribers. The rest of users can only join and see messages.
Broadcast channels and megagroups both are treated as “channels” by Telegram’s API, but this variant will always represent a broadcast channel. The only difference between a broadcast channel and a megagroup are the permissions (default, and available).
Fields§
§raw: Channel
Implementations§
Source§impl Channel
impl Channel
pub fn from_raw(chat: Chat) -> Self
Sourcepub fn pack(&self) -> PackedChat
pub fn pack(&self) -> PackedChat
Pack this channel into a smaller representation that can be loaded later.
Sourcepub fn username(&self) -> Option<&str>
pub fn username(&self) -> Option<&str>
Return the public @username of this channel, 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.
Sourcepub fn admin_rights(&self) -> Option<&ChatAdminRights>
pub fn admin_rights(&self) -> Option<&ChatAdminRights>
Return the permissions of the logged-in user in this channel.