Add GuildCreateSchema as per Spacebar Docs
This commit is contained in:
parent
5031db6547
commit
e0a45edb3c
|
@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::errors::FieldFormatError;
|
use crate::errors::FieldFormatError;
|
||||||
|
|
||||||
use super::Embed;
|
use super::{Channel, Embed};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A struct that represents a well-formed email address.
|
A struct that represents a well-formed email address.
|
||||||
|
@ -287,6 +287,18 @@ impl MessageSendSchema {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
pub struct GuildCreateSchema {
|
||||||
|
name: Option<String>,
|
||||||
|
region: Option<String>,
|
||||||
|
icon: Option<String>,
|
||||||
|
channels: Option<Vec<Channel>>,
|
||||||
|
guild_template_code: Option<String>,
|
||||||
|
system_channel_id: Option<String>,
|
||||||
|
rules_channel_id: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
// I know that some of these tests are... really really basic and unneccessary, but sometimes, I
|
// I know that some of these tests are... really really basic and unneccessary, but sometimes, I
|
||||||
// just feel like writing tests, so there you go :) -@bitfl0wer
|
// just feel like writing tests, so there you go :) -@bitfl0wer
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in New Issue