summary refs log tree commit diff
path: root/src/schema
diff options
context:
space:
mode:
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/Channel.ts2
-rw-r--r--src/schema/Guild.ts21
-rw-r--r--src/schema/User.ts4
3 files changed, 17 insertions, 10 deletions
diff --git a/src/schema/Channel.ts b/src/schema/Channel.ts

index 2cb7f7f4..48c3a1d2 100644 --- a/src/schema/Channel.ts +++ b/src/schema/Channel.ts
@@ -3,7 +3,7 @@ import { Length } from "../util/instanceOf"; export const ChannelModifySchema = { name: new Length(String, 2, 100), - type: Number, + type: new Length(Number, 0, 13), $topic: new Length(String, 0, 1024), $bitrate: Number, $user_limit: Number, 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 +} diff --git a/src/schema/User.ts b/src/schema/User.ts
index ae213ee3..77ee08b4 100644 --- a/src/schema/User.ts +++ b/src/schema/User.ts
@@ -4,7 +4,8 @@ export const UserModifySchema = { $username: new Length(String, 2, 32), $avatar: String, $bio: new Length(String, 0, 190), - $accent_color: Number + $accent_color: Number, + $banner: String }; export interface UserModifySchema { @@ -12,4 +13,5 @@ export interface UserModifySchema { avatar?: string | null; bio?: string; accent_color?: number | null; + banner?: string | null; }