Revert "Add ChannelType enum"

This reverts commit d100308dfd.
This commit is contained in:
bitfl0wer 2023-05-23 15:17:04 +02:00
parent de9040de80
commit cc332847fb
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 2 additions and 23 deletions

View File

@ -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<String>,
pub position: Option<i32>,
pub permission_overwrites: Option<Vec<PermissionOverwrite>>,
@ -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,
}