diff --git a/src/api/types.rs b/src/api/types.rs index 4e76c8b..5631130 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -544,8 +544,7 @@ struct ChannelMention { id: String, guild_id: String, #[serde(rename = "type")] - #[serde(flatten)] - channel_type: ChannelType, + channel_type: i32, name: String, } @@ -743,8 +742,7 @@ pub struct GuildMember { pub struct Channel { pub id: String, #[serde(rename = "type")] - #[serde(flatten)] - pub channel_type: ChannelType, + pub channel_type: i32, pub guild_id: Option, pub position: Option, pub permission_overwrites: Option>, @@ -1482,22 +1480,3 @@ pub struct Webhook { pub struct GuildCreateResponse { pub id: String, } - -#[derive(Serialize, Deserialize, Debug, Default, Clone)] -#[serde(rename_all = "SCREAMING_SNAKE_CASE")] -// TODO: Implement in polyphony/types -pub enum ChannelType { - #[default] - GuildText = 0, - DM = 1, - GuildVoice = 2, - GroupDM = 3, - GuildCategory = 4, - GuildAnnouncement = 5, - AnnouncementThread = 10, - PublicThread = 11, - PrivateThread = 12, - GuildStageVoice = 13, - GuildDirectory = 14, - GuildForum = 15, -}