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/Invite.ts2
-rw-r--r--src/schema/Member.ts26
-rw-r--r--src/schema/Message.ts18
-rw-r--r--src/schema/Roles.ts31
4 files changed, 35 insertions, 42 deletions
diff --git a/src/schema/Invite.ts b/src/schema/Invite.ts

index 3c944037..a22449ba 100644 --- a/src/schema/Invite.ts +++ b/src/schema/Invite.ts
@@ -7,7 +7,7 @@ export const InviteCreateSchema = { $temporary: Boolean, $unique: Boolean, $target_user: String, - $target_user_type: Number, + $target_user_type: Number }; export interface InviteCreateSchema { target_user_id?: String; diff --git a/src/schema/Member.ts b/src/schema/Member.ts
index 49a4d7ce..607d0a06 100644 --- a/src/schema/Member.ts +++ b/src/schema/Member.ts
@@ -1,21 +1,29 @@ export const MemberCreateSchema = { id: String, - nick: String, - guild_id: String, - joined_at: Date, + nick: String, + guild_id: String, + joined_at: Date }; export interface MemberCreateSchema { id: string; - nick: string; - guild_id: string; + nick: string; + guild_id: string; joined_at: Date; } export const MemberNickChangeSchema = { - nick: String, -} + nick: String +}; export interface MemberNickChangeSchema { - nick: string, -} \ No newline at end of file + nick: string; +} + +export const MemberChangeSchema = { + $roles: [String] +}; + +export interface MemberChangeSchema { + roles?: string[]; +} diff --git a/src/schema/Message.ts b/src/schema/Message.ts
index 9b62edcf..e6aa42b3 100644 --- a/src/schema/Message.ts +++ b/src/schema/Message.ts
@@ -5,6 +5,7 @@ export const MessageCreateSchema = { $content: new Length(String, 0, 2000), $nonce: String, $tts: Boolean, + $flags: BigInt, $embed: { $title: new Length(String, 0, 256), //title of embed $type: String, // type of embed (always "rich" for webhook embeds) @@ -15,48 +16,49 @@ export const MessageCreateSchema = { $footer: { text: new Length(String, 0, 2048), icon_url: String, - proxy_icon_url: String, + proxy_icon_url: String }, // footer object footer information $image: EmbedImage, // image object image information $thumbnail: EmbedImage, // thumbnail object thumbnail information $video: EmbedImage, // video object video information $provider: { name: String, - url: String, + url: String }, // provider object provider information $author: { name: new Length(String, 0, 256), url: String, icon_url: String, - proxy_icon_url: String, + proxy_icon_url: String }, // author object author information $fields: new Length( [ { name: new Length(String, 0, 256), value: new Length(String, 0, 1024), - $inline: Boolean, - }, + $inline: Boolean + } ], 0, 25 - ), + ) }, $allowed_mentions: [], $message_reference: { message_id: String, channel_id: String, $guild_id: String, - $fail_if_not_exists: Boolean, + $fail_if_not_exists: Boolean }, $payload_json: String, - $file: Object, + $file: Object }; export interface MessageCreateSchema { content?: string; nonce?: string; tts?: boolean; + flags?: bigint; embed?: Embed & { timestamp?: string }; allowed_mentions?: []; message_reference?: { diff --git a/src/schema/Roles.ts b/src/schema/Roles.ts
index fe76dadc..f662e61b 100644 --- a/src/schema/Roles.ts +++ b/src/schema/Roles.ts
@@ -1,34 +1,17 @@ -export const RoleCreateSchema = { - name: String, - permissions: BigInt, - color: Number, - hoist: Boolean, // whether the role should be displayed separately in the sidebar - mentionable: Boolean // whether the role should be mentionable -}; - -export interface RoleCreateSchema { - name: string, - permissions: BigInt, - color: number, - hoist: boolean, // whether the role should be displayed separately in the sidebar - mentionable: boolean // whether the role should be mentionable -} - export const RoleModifySchema = { $name: String, $permissions: BigInt, $color: Number, $hoist: Boolean, // whether the role should be displayed separately in the sidebar $mentionable: Boolean, // whether the role should be mentionable - $position: Number, - + $position: Number }; export interface RoleModifySchema { - name?: string, - permissions?: BigInt, - color?: number, - hoist?: boolean, // whether the role should be displayed separately in the sidebar - mentionable?: boolean, // whether the role should be mentionable - position?: number, + name?: string; + permissions?: BigInt; + color?: number; + hoist?: boolean; // whether the role should be displayed separately in the sidebar + mentionable?: boolean; // whether the role should be mentionable + position?: number; }