Struct carapax::types::CreateNewStickerSet
source · pub struct CreateNewStickerSet { /* private fields */ }
Expand description
Creates a new sticker set owned by a user.
The bot will be able to edit the created sticker set.
Implementations§
source§impl CreateNewStickerSet
impl CreateNewStickerSet
sourcepub fn new<A, B>(
user_id: i64,
name: A,
title: B,
stickers: InputStickers
) -> Result<CreateNewStickerSet, InputStickerError>
pub fn new<A, B>( user_id: i64, name: A, title: B, stickers: InputStickers ) -> Result<CreateNewStickerSet, InputStickerError>
Creates a new CreateNewStickerSet
.
§Arguments
user_id
- User identifier of created sticker set owner.name
- 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.title
- Sticker set title; 1-64 characters.stickers
- A list of 1-50 initial stickers to be added to the sticker set.
sourcepub fn with_needs_repainting(self, value: bool) -> CreateNewStickerSet
pub fn with_needs_repainting(self, value: bool) -> CreateNewStickerSet
Sets a new value for a needs_repainting
flag.
§Arguments
value
- Indicates whether 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.
sourcepub fn with_sticker_type(self, value: StickerType) -> CreateNewStickerSet
pub fn with_sticker_type(self, value: StickerType) -> CreateNewStickerSet
Sets a new sticker type.
§Arguments
value
- Type of stickers in the set.
By default, a regular sticker set is created.
Trait Implementations§
source§impl Debug for CreateNewStickerSet
impl Debug for CreateNewStickerSet
source§impl Method for CreateNewStickerSet
impl Method for CreateNewStickerSet
Auto Trait Implementations§
impl Freeze for CreateNewStickerSet
impl !RefUnwindSafe for CreateNewStickerSet
impl Send for CreateNewStickerSet
impl Sync for CreateNewStickerSet
impl Unpin for CreateNewStickerSet
impl !UnwindSafe for CreateNewStickerSet
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more