Struct botapi::gen_types::ChatPermissionsBuilder
source · pub struct ChatPermissionsBuilder { /* private fields */ }Expand description
Describes actions that a non-administrator user is allowed to take in a chat.
Implementations§
source§impl ChatPermissionsBuilder
impl ChatPermissionsBuilder
pub fn new() -> Self
sourcepub fn set_can_send_messages(self, can_send_messages: bool) -> Self
pub fn set_can_send_messages(self, can_send_messages: bool) -> Self
Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues
sourcepub fn set_can_send_audios(self, can_send_audios: bool) -> Self
pub fn set_can_send_audios(self, can_send_audios: bool) -> Self
Optional. True, if the user is allowed to send audios
sourcepub fn set_can_send_documents(self, can_send_documents: bool) -> Self
pub fn set_can_send_documents(self, can_send_documents: bool) -> Self
Optional. True, if the user is allowed to send documents
sourcepub fn set_can_send_photos(self, can_send_photos: bool) -> Self
pub fn set_can_send_photos(self, can_send_photos: bool) -> Self
Optional. True, if the user is allowed to send photos
sourcepub fn set_can_send_videos(self, can_send_videos: bool) -> Self
pub fn set_can_send_videos(self, can_send_videos: bool) -> Self
Optional. True, if the user is allowed to send videos
sourcepub fn set_can_send_video_notes(self, can_send_video_notes: bool) -> Self
pub fn set_can_send_video_notes(self, can_send_video_notes: bool) -> Self
Optional. True, if the user is allowed to send video notes
sourcepub fn set_can_send_voice_notes(self, can_send_voice_notes: bool) -> Self
pub fn set_can_send_voice_notes(self, can_send_voice_notes: bool) -> Self
Optional. True, if the user is allowed to send voice notes
sourcepub fn set_can_send_polls(self, can_send_polls: bool) -> Self
pub fn set_can_send_polls(self, can_send_polls: bool) -> Self
Optional. True, if the user is allowed to send polls
sourcepub fn set_can_send_other_messages(self, can_send_other_messages: bool) -> Self
pub fn set_can_send_other_messages(self, can_send_other_messages: bool) -> Self
Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
sourcepub fn set_can_add_web_page_previews(
self,
can_add_web_page_previews: bool
) -> Self
pub fn set_can_add_web_page_previews( self, can_add_web_page_previews: bool ) -> Self
Optional. True, if the user is allowed to add web page previews to their messages
sourcepub fn set_can_change_info(self, can_change_info: bool) -> Self
pub fn set_can_change_info(self, can_change_info: bool) -> Self
Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
sourcepub fn set_can_invite_users(self, can_invite_users: bool) -> Self
pub fn set_can_invite_users(self, can_invite_users: bool) -> Self
Optional. True, if the user is allowed to invite new users to the chat
sourcepub fn set_can_pin_messages(self, can_pin_messages: bool) -> Self
pub fn set_can_pin_messages(self, can_pin_messages: bool) -> Self
Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
sourcepub fn set_can_manage_topics(self, can_manage_topics: bool) -> Self
pub fn set_can_manage_topics(self, can_manage_topics: bool) -> Self
Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
pub fn build(self) -> ChatPermissions
Trait Implementations§
source§impl Clone for ChatPermissionsBuilder
impl Clone for ChatPermissionsBuilder
source§fn clone(&self) -> ChatPermissionsBuilder
fn clone(&self) -> ChatPermissionsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more