Add ChannelType enum
This commit is contained in:
parent
912d8043d0
commit
b293f5ed96
|
@ -544,7 +544,7 @@ struct ChannelMention {
|
||||||
id: String,
|
id: String,
|
||||||
guild_id: String,
|
guild_id: String,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
channel_type: i32,
|
channel_type: ChannelType,
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ pub struct GuildMember {
|
||||||
pub struct Channel {
|
pub struct Channel {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub channel_type: i32,
|
pub channel_type: ChannelType,
|
||||||
pub guild_id: Option<String>,
|
pub guild_id: Option<String>,
|
||||||
pub position: Option<i32>,
|
pub position: Option<i32>,
|
||||||
pub permission_overwrites: Option<Vec<PermissionOverwrite>>,
|
pub permission_overwrites: Option<Vec<PermissionOverwrite>>,
|
||||||
|
@ -1480,3 +1480,21 @@ pub struct Webhook {
|
||||||
pub struct GuildCreateResponse {
|
pub struct GuildCreateResponse {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
||||||
|
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue