Remove sticker_format parameter from CreateNewStickerSet

This commit is contained in:
Akshett Rai Jindal 2024-08-20 20:55:08 +05:30
parent 590d46477f
commit 2655607320
5 changed files with 5 additions and 14 deletions

View file

@ -3783,11 +3783,6 @@ Schema(
ty: ArrayOf(RawTy("InputSticker")), ty: ArrayOf(RawTy("InputSticker")),
descr: Doc(md: "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set") descr: Doc(md: "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set")
), ),
Param(
name: "sticker_format",
ty: RawTy("StickerFormat"),
descr: Doc(md: "Format of the sticker, must be one of “static”, “animated”, “video”")
),
Param( Param(
name: "sticker_type", name: "sticker_type",
ty: Option(RawTy("StickerType")), ty: Option(RawTy("StickerType")),

View file

@ -6,7 +6,7 @@ use crate::{
requests::{JsonRequest, MultipartRequest}, requests::{JsonRequest, MultipartRequest},
types::{ types::{
BotCommand, ChatId, ChatPermissions, InlineQueryResult, InputFile, InputMedia, BotCommand, ChatId, ChatPermissions, InlineQueryResult, InputFile, InputMedia,
InputSticker, LabeledPrice, MessageId, Recipient, StickerFormat, ThreadId, UserId, InputSticker, LabeledPrice, MessageId, Recipient, ThreadId, UserId,
}, },
Bot, Bot,
}; };
@ -1189,7 +1189,6 @@ impl Requester for Bot {
name: N, name: N,
title: T, title: T,
stickers: S, stickers: S,
sticker_format: StickerFormat,
) -> Self::CreateNewStickerSet ) -> Self::CreateNewStickerSet
where where
N: Into<String>, N: Into<String>,
@ -1198,7 +1197,7 @@ impl Requester for Bot {
{ {
Self::CreateNewStickerSet::new( Self::CreateNewStickerSet::new(
self.clone(), self.clone(),
payloads::CreateNewStickerSet::new(user_id, name, title, stickers, sticker_format), payloads::CreateNewStickerSet::new(user_id, name, title, stickers),
) )
} }

View file

@ -1308,11 +1308,11 @@ macro_rules! requester_forward {
(@method create_new_sticker_set $body:ident $ty:ident) => { (@method create_new_sticker_set $body:ident $ty:ident) => {
type CreateNewStickerSet = $ty![CreateNewStickerSet]; type CreateNewStickerSet = $ty![CreateNewStickerSet];
fn create_new_sticker_set<N, T, S>(&self, user_id: UserId, name: N, title: T, stickers: S, sticker_format: StickerFormat) -> Self::CreateNewStickerSet where N: Into<String>, fn create_new_sticker_set<N, T, S>(&self, user_id: UserId, name: N, title: T, stickers: S) -> Self::CreateNewStickerSet where N: Into<String>,
T: Into<String>, T: Into<String>,
S: IntoIterator<Item = InputSticker> { S: IntoIterator<Item = InputSticker> {
let this = self; let this = self;
$body!(create_new_sticker_set this (user_id: UserId, name: N, title: T, stickers: S, sticker_format: StickerFormat)) $body!(create_new_sticker_set this (user_id: UserId, name: N, title: T, stickers: S))
} }
}; };
(@method add_sticker_to_set $body:ident $ty:ident) => { (@method add_sticker_to_set $body:ident $ty:ident) => {

View file

@ -2,7 +2,7 @@
use serde::Serialize; use serde::Serialize;
use crate::types::{InputSticker, StickerFormat, StickerType, True, UserId}; use crate::types::{InputSticker, StickerType, True, UserId};
impl_payload! { impl_payload! {
/// 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. /// 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.
@ -17,8 +17,6 @@ impl_payload! {
pub title: String [into], pub title: String [into],
/// A JSON-serialized list of 1-50 initial stickers to be added to the sticker set /// A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
pub stickers: Vec<InputSticker> [collect], pub stickers: Vec<InputSticker> [collect],
/// Format of the sticker, must be one of “static”, “animated”, “video”
pub sticker_format: StickerFormat,
} }
optional { optional {
/// Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created. /// Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.

View file

@ -1071,7 +1071,6 @@ pub trait Requester {
name: N, name: N,
title: T, title: T,
stickers: S, stickers: S,
sticker_format: StickerFormat,
) -> Self::CreateNewStickerSet ) -> Self::CreateNewStickerSet
where where
N: Into<String>, N: Into<String>,