summary refs log tree commit diff
path: root/api/src/schema/Message.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-01 10:47:00 +0200
committerGitHub <noreply@github.com>2021-09-01 10:47:00 +0200
commitdf1d633c4b56bea97e0b76da34171d80c0c6a3ff (patch)
tree7e57837ec000a641935a32649ac17b38ef2e29d8 /api/src/schema/Message.ts
parentMerge pull request #287 from EMREOYUN/patch-1 (diff)
parentMerge pull request #299 from AlTech98/typeorm (diff)
downloadserver-df1d633c4b56bea97e0b76da34171d80c0c6a3ff.tar.xz
Merge pull request #300 from fosscord/typeorm
Diffstat (limited to 'api/src/schema/Message.ts')
-rw-r--r--api/src/schema/Message.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/api/src/schema/Message.ts b/api/src/schema/Message.ts

index 2dd54f0c..742542df 100644 --- a/api/src/schema/Message.ts +++ b/api/src/schema/Message.ts
@@ -1,11 +1,17 @@ -import { Embed, EmbedImage } from "@fosscord/util"; +import { Embed } from "@fosscord/util"; import { Length } from "../util/instanceOf"; +export const EmbedImage = { + $url: String, + $width: Number, + $height: Number +}; + export const MessageCreateSchema = { $content: new Length(String, 0, 2000), $nonce: String, $tts: Boolean, - $flags: BigInt, + $flags: String, $embed: { $title: new Length(String, 0, 256), //title of embed $type: String, // type of embed (always "rich" for webhook embeds) @@ -63,7 +69,7 @@ export interface MessageCreateSchema { content?: string; nonce?: string; tts?: boolean; - flags?: bigint; + flags?: string; embed?: Embed & { timestamp?: string }; allowed_mentions?: { parse?: string[]; @@ -75,7 +81,7 @@ export interface MessageCreateSchema { message_id: string; channel_id: string; guild_id?: string; - fail_if_not_exists: boolean; + fail_if_not_exists?: boolean; }; payload_json?: string; file?: any;