From b5660cf657a5eae3c1ea4dfc36cb0341d600555c Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Tue, 6 Jul 2021 16:37:34 -0500 Subject: [PATCH] feat: added most of the message create api type --- src/utils/types.ts | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/utils/types.ts b/src/utils/types.ts index bf705da..8d2312c 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -22,6 +22,22 @@ export interface IMakeRequestOptions extends IRequestOptions { method: ApiMethods; } +export interface IMessageEmbed { + description: string; + title?: string; + type?: 'rich'; + url?: string; + color?: number; + timestamp?: number; + author?: { name?: string, url?: string }; + fields?: { name: string, value: string, inline?: boolean }[]; + footer?: { text?: string, icon_url?: string }; + image?: { url?: string }; + provider?: { name?: string, url?: string }; + thumbnail?: { url?: string }; + video?: { url?: string }; +} + export interface IRequestOptions { path: string; reason?: string; @@ -32,9 +48,23 @@ export interface IRequestOptions { } // Api Rest Request Interfaces -// TODO: Finish this up +// TODO: Add message components export interface IApiCreateMessage { - content: string; + content?: string; + tts?: boolean; + embeds?: IMessageEmbed; + allowed_mentions: { + roles?: string[]; + users?: string[]; + replied_user?: boolean; + parse?: 'everyone' | 'roles' | 'users'[]; + }; + message_reference: { + channel_id?: string; + guild_id?: string; + message_id?: string; + fail_if_not_exists?: boolean; + }; } // Enums