cliipy my arch nemesis strikes again

This commit is contained in:
kozabrada123 2024-08-16 15:40:33 +02:00
parent 9a4c9bce2d
commit 38d5fffc81
1 changed files with 14 additions and 14 deletions

View File

@ -817,17 +817,17 @@ pub struct GuildAffinity {
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] #[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct PremiumUsage { pub struct PremiumUsage {
/// Number of Nitro stickers the user has sent /// Number of Nitro stickers the user has sent
pub nitro_sticker_sends: PremiumUsageEntry, pub nitro_sticker_sends: PremiumUsageData,
/// Number of animated emojis the user has sent /// Number of animated emojis the user has sent
pub total_animated_emojis: PremiumUsageEntry, pub total_animated_emojis: PremiumUsageData,
/// Number of global emojis the user has sent /// Number of global emojis the user has sent
pub total_global_emojis: PremiumUsageEntry, pub total_global_emojis: PremiumUsageData,
/// Number of large uploads the user has made /// Number of large uploads the user has made
pub total_large_uploads: PremiumUsageEntry, pub total_large_uploads: PremiumUsageData,
/// Number of times the user has streamed in HD /// Number of times the user has streamed in HD
pub total_hd_streams: PremiumUsageEntry, pub total_hd_streams: PremiumUsageData,
/// Number of hours the user has streamed in HD /// Number of hours the user has streamed in HD
pub hd_hours_streamed: PremiumUsageEntry, pub hd_hours_streamed: PremiumUsageData,
} }
/// Structure for the data in [PremiumUsage]. /// Structure for the data in [PremiumUsage].
@ -837,19 +837,19 @@ pub struct PremiumUsage {
/// # Reference /// # Reference
/// See <https://docs.discord.sex/resources/user#premium-usage-structure> /// See <https://docs.discord.sex/resources/user#premium-usage-structure>
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] #[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct PremiumUsageEntry { pub struct PremiumUsageData {
/// Total number of uses for this perk /// Total number of uses for this perk
pub value: usize, pub value: usize,
} }
impl Into<usize> for PremiumUsageEntry { impl Into<PremiumUsageData> for usize {
fn into(self) -> PremiumUsageData {
PremiumUsageData { value: self }
}
}
impl Into<usize> for PremiumUsageData {
fn into(self) -> usize { fn into(self) -> usize {
self.value self.value
} }
} }
impl From<usize> for PremiumUsageEntry {
fn from(value: usize) -> Self {
PremiumUsageEntry { value }
}
}