teloxide_core/payloads/
upload_sticker_file.rs

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