feat(Message): Stickers (#32)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
Advaith
2020-11-21 06:19:13 -08:00
committed by GitHub
parent fde45f9235
commit 39ea1f4429
2 changed files with 26 additions and 0 deletions

View File

@@ -92,6 +92,8 @@ export enum RESTJSONErrorCodes {
CannotDeleteChannelRequiredForCommunityGuilds = 50074,
InvalidStickerSent = 50081,
TwoFactorAuthenticationIsRequired = 60003,
ReactionWasBlocked = 90001,

View File

@@ -79,6 +79,7 @@ export interface APIMessage {
message_reference?: APIMessageReference;
flags?: MessageFlags;
referenced_message?: APIMessage | null;
stickers?: APISticker[];
}
/**
@@ -154,6 +155,29 @@ export enum MessageFlags {
URGENT = 1 << 4,
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-sticker-structure
*/
export interface APISticker {
id: string;
pack_id: string;
name: string;
description: string;
tags?: string;
asset: string;
preview_asset: string | null;
format_type: StickerFormatType;
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-sticker-format-types
*/
export enum StickerFormatType {
PNG = 1,
APNG,
LOTTIE,
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
*/