Skip to main content

ronami_core/payloads/
upload_sticker_file.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::File;
6use crate::types::InputFile;
7use crate::types::StickerFormat;
8use crate::types::UserId;
9
10impl_payload! {
11    @[multipart = sticker]
12    /// Use this method to upload a file with a sticker for later use in the [CreateNewStickerSet], [AddStickerToSet] or [ReplaceStickerInSet] methods (the file can be used multiple times). Returns the uploaded [`File`] on success.
13    ///
14    /// [CreateNewStickerSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.CreateNewStickerSet.html
15    /// [AddStickerToSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.AddStickerToSet.html
16    /// [ReplaceStickerInSet]: https://docs.rs/ronami/latest/ronami/payloads/struct.ReplaceStickerInSet.html
17    /// [`File`]: crate::types::File
18    #[derive(Debug, Clone, Serialize)]
19    pub UploadStickerFile (UploadStickerFileSetters) => File {
20        required {
21            /// User identifier of sticker file owner
22            pub user_id: UserId,
23            /// A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. [Technical requirements]. [More info on Sending Files »]
24            ///
25            /// [More info on Sending Files »]: crate::types::InputFile
26            /// [Technical requirements]: https://core.telegram.org/stickers
27            pub sticker: InputFile,
28            /// Format of the sticker, must be one of “static”, “animated”, “video”
29            pub sticker_format: StickerFormat,
30        }
31    }
32}