Struct tgbot::types::CreateForumTopic
source · pub struct CreateForumTopic { /* private fields */ }
Expand description
Creates a topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights.
Implementations§
source§impl CreateForumTopic
impl CreateForumTopic
sourcepub fn new<A, B>(chat_id: A, name: B) -> Self
pub fn new<A, B>(chat_id: A, name: B) -> Self
Creates a new CreateForumTopic
.
§Arguments
chat_id
- Unique identifier of the target chat.name
- Topic name; 1 - 128 characters.
sourcepub fn with_icon_color(self, value: ForumTopicIconColor) -> Self
pub fn with_icon_color(self, value: ForumTopicIconColor) -> Self
sourcepub fn with_icon_custom_emoji_id<T>(self, value: T) -> Self
pub fn with_icon_custom_emoji_id<T>(self, value: T) -> Self
Sets a new icon custom emoji ID.
§Arguments
value
- Unique identifier of the custom emoji shown as the topic icon.
Use GetForumTopicIconStickers
to get all allowed custom emoji identifiers.
Trait Implementations§
source§impl Clone for CreateForumTopic
impl Clone for CreateForumTopic
source§fn clone(&self) -> CreateForumTopic
fn clone(&self) -> CreateForumTopic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreateForumTopic
impl Debug for CreateForumTopic
source§impl Method for CreateForumTopic
impl Method for CreateForumTopic
§type Response = ForumTopic
type Response = ForumTopic
The type representing a successful result in an API response.
source§fn into_payload(self) -> Payload
fn into_payload(self) -> Payload
Converts the method into a payload for an HTTP request.
Auto Trait Implementations§
impl Freeze for CreateForumTopic
impl RefUnwindSafe for CreateForumTopic
impl Send for CreateForumTopic
impl Sync for CreateForumTopic
impl Unpin for CreateForumTopic
impl UnwindSafe for CreateForumTopic
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more