fix: allow removing channel slowmode (#836)
Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
@@ -161,6 +161,7 @@ auto_derived!(
|
|||||||
Icon,
|
Icon,
|
||||||
DefaultPermissions,
|
DefaultPermissions,
|
||||||
Voice,
|
Voice,
|
||||||
|
Slowmode,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -554,6 +555,12 @@ impl Channel {
|
|||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
|
FieldsChannel::Slowmode => match self {
|
||||||
|
Self::TextChannel { slowmode, .. } => {
|
||||||
|
slowmode.take();
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,6 +784,7 @@ impl IntoDocumentPath for FieldsChannel {
|
|||||||
FieldsChannel::Icon => "icon",
|
FieldsChannel::Icon => "icon",
|
||||||
FieldsChannel::DefaultPermissions => "default_permissions",
|
FieldsChannel::DefaultPermissions => "default_permissions",
|
||||||
FieldsChannel::Voice => "voice",
|
FieldsChannel::Voice => "voice",
|
||||||
|
FieldsChannel::Slowmode => "slowmode",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ impl From<FieldsChannel> for crate::FieldsChannel {
|
|||||||
FieldsChannel::Icon => crate::FieldsChannel::Icon,
|
FieldsChannel::Icon => crate::FieldsChannel::Icon,
|
||||||
FieldsChannel::DefaultPermissions => crate::FieldsChannel::DefaultPermissions,
|
FieldsChannel::DefaultPermissions => crate::FieldsChannel::DefaultPermissions,
|
||||||
FieldsChannel::Voice => crate::FieldsChannel::Voice,
|
FieldsChannel::Voice => crate::FieldsChannel::Voice,
|
||||||
|
FieldsChannel::Slowmode => crate::FieldsChannel::Slowmode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,6 +331,7 @@ impl From<crate::FieldsChannel> for FieldsChannel {
|
|||||||
crate::FieldsChannel::Icon => FieldsChannel::Icon,
|
crate::FieldsChannel::Icon => FieldsChannel::Icon,
|
||||||
crate::FieldsChannel::DefaultPermissions => FieldsChannel::DefaultPermissions,
|
crate::FieldsChannel::DefaultPermissions => FieldsChannel::DefaultPermissions,
|
||||||
crate::FieldsChannel::Voice => FieldsChannel::Voice,
|
crate::FieldsChannel::Voice => FieldsChannel::Voice,
|
||||||
|
crate::FieldsChannel::Slowmode => FieldsChannel::Slowmode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ auto_derived!(
|
|||||||
Icon,
|
Icon,
|
||||||
DefaultPermissions,
|
DefaultPermissions,
|
||||||
Voice,
|
Voice,
|
||||||
|
Slowmode,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// New webhook information
|
/// New webhook information
|
||||||
|
|||||||
@@ -221,6 +221,9 @@ pub async fn edit(
|
|||||||
v0::FieldsChannel::Voice => {
|
v0::FieldsChannel::Voice => {
|
||||||
voice.take();
|
voice.take();
|
||||||
}
|
}
|
||||||
|
v0::FieldsChannel::Slowmode => {
|
||||||
|
slowmode.take();
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user