pub struct CreateNewStickerSetRequest<'a> { /* private fields */ }Expand description
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.
Implementations§
Source§impl<'a> CreateNewStickerSetRequest<'a>
impl<'a> CreateNewStickerSetRequest<'a>
pub fn new( api: &'a API, user_id: impl Into<i64>, name: impl Into<String>, title: impl Into<String>, stickers: impl IntoIterator<Item = impl Into<InputSticker>>, ) -> Self
Sourcepub fn user_id(self, user_id: impl Into<i64>) -> Self
pub fn user_id(self, user_id: impl Into<i64>) -> Self
User identifier of created sticker set owner
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can’t contain consecutive underscores and must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters.
Sourcepub fn stickers(
self,
stickers: impl IntoIterator<Item = impl Into<InputSticker>>,
) -> Self
pub fn stickers( self, stickers: impl IntoIterator<Item = impl Into<InputSticker>>, ) -> Self
A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
Sourcepub fn sticker_type(
self,
sticker_type: impl Into<CreateNewStickerSetStickerType>,
) -> Self
pub fn sticker_type( self, sticker_type: impl Into<CreateNewStickerSetStickerType>, ) -> Self
Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.
Sourcepub fn needs_repainting(self, needs_repainting: impl Into<bool>) -> Self
pub fn needs_repainting(self, needs_repainting: impl Into<bool>) -> Self
Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only
Trait Implementations§
Source§impl<'a> Clone for CreateNewStickerSetRequest<'a>
impl<'a> Clone for CreateNewStickerSetRequest<'a>
Source§fn clone(&self) -> CreateNewStickerSetRequest<'a>
fn clone(&self) -> CreateNewStickerSetRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more