diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 03:37:55 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 03:37:55 +0200 |
commit | 36fe0ec0c8022cbbde23eb87ca00906629255de6 (patch) | |
tree | 43dba167ea6e790ac271b05710c41a539a0fd0d3 /api/src/schema/Message.ts | |
parent | fix #309 (diff) | |
download | server-36fe0ec0c8022cbbde23eb87ca00906629255de6.tar.xz |
:bug: fix member + member list
Diffstat (limited to 'api/src/schema/Message.ts')
-rw-r--r-- | api/src/schema/Message.ts | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/api/src/schema/Message.ts b/api/src/schema/Message.ts index 742542df..d39f685a 100644 --- a/api/src/schema/Message.ts +++ b/api/src/schema/Message.ts @@ -7,48 +7,52 @@ export const EmbedImage = { $height: Number }; +const embed = { + $title: new Length(String, 0, 256), //title of embed + $type: String, // type of embed (always "rich" for webhook embeds) + $description: new Length(String, 0, 2048), // description of embed + $url: String, // url of embed + $timestamp: String, // ISO8601 timestamp + $color: Number, // color code of the embed + $footer: { + text: new Length(String, 0, 2048), + 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 + }, // provider object provider information + $author: { + name: new Length(String, 0, 256), + url: String, + 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 + } + ], + 0, + 25 + ) +}; + export const MessageCreateSchema = { $content: new Length(String, 0, 2000), $nonce: String, $tts: Boolean, $flags: String, - $embed: { - $title: new Length(String, 0, 256), //title of embed - $type: String, // type of embed (always "rich" for webhook embeds) - $description: new Length(String, 0, 2048), // description of embed - $url: String, // url of embed - $timestamp: String, // ISO8601 timestamp - $color: Number, // color code of the embed - $footer: { - text: new Length(String, 0, 2048), - 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 - }, // provider object provider information - $author: { - name: new Length(String, 0, 256), - url: String, - 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 - } - ], - 0, - 25 - ) - }, + $embed: embed, + // TODO: ^ embed is deprecated in favor of embeds (https://discord.com/developers/docs/resources/channel#message-object) + // $embeds: [embed], $allowed_mentions: { $parse: [String], $roles: [String], |