#[non_exhaustive]pub struct CreateGuildSticker {
pub name: CompactString,
pub description: CompactString,
pub tags: CompactString,
pub file: FileUpload,
}Expand description
The body of Create Guild Sticker.
Unlike most bodies it is sent as multipart/form-data fields, not JSON, so it does not
implement Serialize. The file must be a PNG, APNG, GIF or Lottie JSON file of at most
512 KiB and 320×320 pixels (animated: at most 5 seconds); Lottie stickers need a verified or
partnered guild.
discord.js counterpart: GuildStickerCreateOptions.
§Examples
use djs_model::rest::{CreateGuildSticker, FileUpload};
let file = FileUpload::new("wave.png", b"\x89PNG\r\n\x1a\n...".to_vec());
let mut body = CreateGuildSticker::new("Wave", "wave", file);
body.description = "A friendly wave".into();Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: CompactStringThe name (2–30 characters).
description: CompactStringThe description: empty (the default) or 2–100 characters.
The autocomplete and suggestion tags (max 200 characters); Discord’s client uses the
name of a related Unicode emoji, such as wave.
file: FileUploadThe sticker image.
Implementations§
Source§impl CreateGuildSticker
impl CreateGuildSticker
Sourcepub fn new(
name: impl Into<CompactString>,
tags: impl Into<CompactString>,
file: FileUpload,
) -> Self
pub fn new( name: impl Into<CompactString>, tags: impl Into<CompactString>, file: FileUpload, ) -> Self
A sticker named name, suggested for tags, showing file, without a description.
discord.js counterpart: GuildStickerCreateOptions.
Trait Implementations§
Source§impl Clone for CreateGuildSticker
impl Clone for CreateGuildSticker
Source§impl Debug for CreateGuildSticker
impl Debug for CreateGuildSticker
Source§impl PartialEq for CreateGuildSticker
impl PartialEq for CreateGuildSticker
impl StructuralPartialEq for CreateGuildSticker
Auto Trait Implementations§
impl !Freeze for CreateGuildSticker
impl Forget for CreateGuildSticker
impl Move for CreateGuildSticker
impl RefUnwindSafe for CreateGuildSticker
impl Send for CreateGuildSticker
impl Sync for CreateGuildSticker
impl Unpin for CreateGuildSticker
impl UnsafeUnpin for CreateGuildSticker
impl UnwindSafe for CreateGuildSticker
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