disruption_types/resources/
soundboard.rs

1use serde::{Deserialize, Serialize};
2
3use crate::entities::UserApiType;
4
5/// <https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object>
6#[derive(Serialize, Deserialize, Debug, Clone)]
7pub struct SoundboardSoundApiType {
8    /// the name of this sound
9    pub name: String,
10    /// the id of this sound
11    pub sound_id: String,
12    /// the volume of this sound, from 0 to 1
13    pub volume: f64,
14    /// the id of this sound's custom emoji
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub emoji_id: Option<String>,
17    /// the unicode character of this sound's standard emoji
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub emoji_name: Option<String>,
20    /// the id of the guild this sound is in
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub guild_id: Option<String>,
23    /// whether this sound can be used, may be false due to loss of Server Boosts
24    pub available: bool,
25    /// the user who created this sound
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub user: Option<UserApiType>,
28}