summary refs log tree commit diff
path: root/src/schema/Guild.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-14 15:01:53 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-14 15:01:53 +0200
commit6ac4067c39cdcae1cef1718273aaa8796460ffd9 (patch)
tree753cb7c53c914f33e989849753d1ef97767603f6 /src/schema/Guild.ts
parent:bug: fix message schema (diff)
parent:sparkles: add npm i fosscord-server-util to postinstall (diff)
downloadserver-6ac4067c39cdcae1cef1718273aaa8796460ffd9.tar.xz
Merge branch 'master' of https://github.com/discord-open-source/discord-api
Diffstat (limited to 'src/schema/Guild.ts')
-rw-r--r--src/schema/Guild.ts27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/schema/Guild.ts b/src/schema/Guild.ts

index 489c37ff..6527f35d 100644 --- a/src/schema/Guild.ts +++ b/src/schema/Guild.ts
@@ -1,13 +1,22 @@ +import { ChannelSchema, GuildChannel } from "fosscord-server-util"; import { Length } from "../util/instanceOf"; export const GuildCreateSchema = { - name: new Length(String, 2, 100), // ! 2-100 chars + name: new Length(String, 2, 100), $region: String, // auto complete voice region of the user + $icon: String, + $channels: [Object], + $guild_template_code: String, + $system_channel_id: String, }; export interface GuildCreateSchema { name: string; region?: string; + icon?: string; + channels?: GuildChannel[]; + guild_template_code?: string; + system_channel_id?: string; } export const GuildUpdateSchema = { @@ -20,27 +29,27 @@ export const GuildUpdateSchema = { $verification_level: Number, $default_message_notifications: Number, $system_channel_flags: Number, - $system_channel_id: BigInt, + $system_channel_id: String, $explicit_content_filter: Number, - $public_updates_channel_id: BigInt, + $public_updates_channel_id: String, $afk_timeout: Number, - $afk_channel_id: BigInt, + $afk_channel_id: String, }; +// @ts-ignore +delete GuildUpdateSchema.$channels; -export interface GuildUpdateSchema extends GuildCreateSchema { +export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> { banner?: string; splash?: string; description?: string; features?: [string]; - icon?: string; verification_level?: number; default_message_notifications?: number; system_channel_flags?: number; - system_channel_id?: bigint; explicit_content_filter?: number; - public_updates_channel_id?: bigint; + public_updates_channel_id?: string; afk_timeout?: number; - afk_channel_id?: bigint; + afk_channel_id?: string; } export const GuildGetSchema = {