From 72a4d57aff1364caa101c1b9cad40a63c3149022 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sat, 13 May 2023 22:11:06 +0200 Subject: [PATCH] Add GuildCreateSchema as per Spacebar Docs --- src/api/schemas.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/api/schemas.rs b/src/api/schemas.rs index 670a828..6c021b6 100644 --- a/src/api/schemas.rs +++ b/src/api/schemas.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use crate::errors::FieldFormatError; -use super::Embed; +use super::{Channel, Embed}; /** 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, + region: Option, + icon: Option, + channels: Option>, + guild_template_code: Option, + system_channel_id: Option, + rules_channel_id: Option, +} + // 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 #[cfg(test)]