summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-07 19:30:40 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-07 19:30:40 +0200
commit45e97e894c5957ff0898c4c1a7f48f6d43c7d807 (patch)
tree4143d287f82fdd677550a7d12a9a4e4719a70d3a
parentMerge pull request #188 from BanTheNons/guild-icons-banners (diff)
downloadserver-45e97e894c5957ff0898c4c1a7f48f6d43c7d807.tar.xz
:bug: fix GuildUpdate Schema
-rw-r--r--src/schema/Guild.ts21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/schema/Guild.ts b/src/schema/Guild.ts
index 4677efd5..0443e64c 100644
--- a/src/schema/Guild.ts
+++ b/src/schema/Guild.ts
@@ -8,6 +8,7 @@ export const GuildCreateSchema = {
 	$channels: [Object],
 	$guild_template_code: String,
 	$system_channel_id: String,
+	$rules_channel_id: String
 };
 
 export interface GuildCreateSchema {
@@ -17,10 +18,13 @@ export interface GuildCreateSchema {
 	channels?: GuildChannel[];
 	guild_template_code?: string;
 	system_channel_id?: string;
+	rules_channel_id?: string;
 }
 
 export const GuildUpdateSchema = {
 	...GuildCreateSchema,
+	name: undefined,
+	$name: new Length(String, 2, 100),
 	$banner: String,
 	$splash: String,
 	$description: String,
@@ -34,6 +38,7 @@ export const GuildUpdateSchema = {
 	$public_updates_channel_id: String,
 	$afk_timeout: Number,
 	$afk_channel_id: String,
+	$preferred_locale: String
 };
 // @ts-ignore
 delete GuildUpdateSchema.$channels;
@@ -50,6 +55,7 @@ export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
 	public_updates_channel_id?: string;
 	afk_timeout?: number;
 	afk_channel_id?: string;
+	preferred_locale?: string;
 }
 
 export const GuildGetSchema = {
@@ -96,31 +102,30 @@ export const GuildGetSchema = {
 	public_updates_channel_id: true,
 	max_video_channel_users: true,
 	approximate_member_count: true,
-	approximate_presence_count: true,
+	approximate_presence_count: true
 	// welcome_screen: true,
 };
 
 export const GuildTemplateCreateSchema = {
 	name: String,
-	$avatar: String,
-
+	$avatar: String
 };
 
 export interface GuildTemplateCreateSchema {
-	name: string,
-	avatar?: string,
+	name: string;
+	avatar?: string;
 }
 
 export const GuildAddChannelToWelcomeScreenSchema = {
 	channel_id: String,
 	description: String,
 	$emoji_id: String,
-	emoji_name: String,
-}
+	emoji_name: String
+};
 
 export interface GuildAddChannelToWelcomeScreenSchema {
 	channel_id: string;
 	description: string;
 	emoji_id?: string;
 	emoji_name: string;
-}
\ No newline at end of file
+}