Fix: deser error with guild member flags
This commit is contained in:
parent
de9501b428
commit
3946859bd0
|
@ -157,7 +157,10 @@ pub struct PermissionOverwrite {
|
||||||
|
|
||||||
#[derive(Debug, Serialize_repr, Deserialize_repr, Clone, PartialEq, Eq, PartialOrd)]
|
#[derive(Debug, Serialize_repr, Deserialize_repr, Clone, PartialEq, Eq, PartialOrd)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
// Note: gateway sends this is as "role" or "member", causing deserialization errors
|
||||||
/// # Reference
|
/// # Reference
|
||||||
|
///
|
||||||
|
/// See <https://docs.discord.sex/resources/channel#permission-overwrite-type>
|
||||||
pub enum PermissionOverwriteType {
|
pub enum PermissionOverwriteType {
|
||||||
Role = 0,
|
Role = 0,
|
||||||
Member = 1,
|
Member = 1,
|
||||||
|
|
|
@ -170,7 +170,7 @@ pub struct ModifyGuildMemberSchema {
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, PartialOrd, Ord)]
|
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, chorus_macros::SerdeBitFlags)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(chorus_macros::SqlxBitFlags))]
|
#[cfg_attr(feature = "sqlx", derive(chorus_macros::SqlxBitFlags))]
|
||||||
/// Represents the flags of a Guild Member.
|
/// Represents the flags of a Guild Member.
|
||||||
///
|
///
|
||||||
|
@ -409,4 +409,4 @@ pub struct GuildTemplateCreateSchema {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
/// Description of the template (max 120 characters)
|
/// Description of the template (max 120 characters)
|
||||||
pub description: Option<String>
|
pub description: Option<String>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue