From 10bd81274722823f875ba31eaf5fc670bfb22ceb Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 12 Aug 2022 11:36:39 +0200 Subject: Split schemas into files in util --- util/src/schemas/MessageCreateSchema.ts | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 util/src/schemas/MessageCreateSchema.ts (limited to 'util/src/schemas/MessageCreateSchema.ts') diff --git a/util/src/schemas/MessageCreateSchema.ts b/util/src/schemas/MessageCreateSchema.ts new file mode 100644 index 00000000..7b1cc7b9 --- /dev/null +++ b/util/src/schemas/MessageCreateSchema.ts @@ -0,0 +1,34 @@ +import { Embed } from "@fosscord/util"; + + +export interface MessageCreateSchema { + type?: number; + content?: string; + nonce?: string; + channel_id?: string; + tts?: boolean; + flags?: string; + embeds?: Embed[]; + embed?: Embed; + // TODO: ^ embed is deprecated in favor of embeds (https://discord.com/developers/docs/resources/channel#message-object) + allowed_mentions?: { + parse?: string[]; + roles?: string[]; + users?: string[]; + replied_user?: boolean; + }; + message_reference?: { + message_id: string; + channel_id: string; + guild_id?: string; + fail_if_not_exists?: boolean; + }; + payload_json?: string; + file?: any; + /** + TODO: we should create an interface for attachments + TODO: OpenWAAO<-->attachment-style metadata conversion + **/ + attachments?: any[]; + sticker_ids?: string[]; +} -- cgit 1.5.1