Archived
0
0
Fork 0

feat: added most of the message create api type

This commit is contained in:
Daryl Ronningen 2021-07-06 16:37:34 -05:00
parent d574281127
commit b5660cf657
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B

View file

@ -22,6 +22,22 @@ export interface IMakeRequestOptions extends IRequestOptions {
method: ApiMethods; 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 { export interface IRequestOptions {
path: string; path: string;
reason?: string; reason?: string;
@ -32,9 +48,23 @@ export interface IRequestOptions {
} }
// Api Rest Request Interfaces // Api Rest Request Interfaces
// TODO: Finish this up // TODO: Add message components
export interface IApiCreateMessage { 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 // Enums