Skip to main content

ronami_core/payloads/
replace_sticker_in_set.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::InputSticker;
6use crate::types::True;
7use crate::types::UserId;
8
9impl_payload! {
10    @[multipart = sticker]
11    /// Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling [DeleteStickerFromSet], then [AddStickerToSet], then [SetStickerPositionInSet]. Returns _True_ on success.
12    ///
13    /// [DeleteStickerFromSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.DeleteStickerFromSet.html
14    /// [AddStickerToSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.AddStickerToSet.html
15    /// [SetStickerPositionInSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.SetStickerPositionInSet.html
16    #[derive(Debug, Clone, Serialize)]
17    pub ReplaceStickerInSet (ReplaceStickerInSetSetters) => True {
18        required {
19            /// User identifier of the sticker set owner
20            pub user_id: UserId,
21            /// Sticker set name
22            pub name: String [into],
23            /// File identifier of the replaced sticker
24            pub old_sticker: String [into],
25            /// A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.
26            pub sticker: InputSticker,
27        }
28    }
29}