Create GuildBanCreateSchema, clean up GuildCreateSchema
This commit is contained in:
parent
3e9ca3f9ba
commit
b53afe855d
|
@ -2,10 +2,10 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::types::entities::Channel;
|
use crate::types::entities::Channel;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
/// Represents the schema which needs to be sent to create a Guild.
|
/// Represents the schema which needs to be sent to create a Guild.
|
||||||
/// See: [https://docs.spacebar.chat/routes/#cmp--schemas-guildcreateschema](https://docs.spacebar.chat/routes/#cmp--schemas-guildcreateschema)
|
/// See: <https://docs.spacebar.chat/routes/#cmp--schemas-guildcreateschema>
|
||||||
pub struct GuildCreateSchema {
|
pub struct GuildCreateSchema {
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub region: Option<String>,
|
pub region: Option<String>,
|
||||||
|
@ -15,3 +15,12 @@ pub struct GuildCreateSchema {
|
||||||
pub system_channel_id: Option<String>,
|
pub system_channel_id: Option<String>,
|
||||||
pub rules_channel_id: Option<String>,
|
pub rules_channel_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Serialize, Default, Clone, Copy, Eq, PartialEq)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
/// Represents the schema which needs to be sent to create a Guild Ban.
|
||||||
|
/// See: <https://discord-userdoccers.vercel.app/resources/guild#create-guild-ban>
|
||||||
|
pub struct GuildBanCreateSchema {
|
||||||
|
pub delete_message_days: Option<u8>,
|
||||||
|
pub delete_message_seconds: Option<u32>,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue