From 39ea1f4429e5194576200635f885ab102763060b Mon Sep 17 00:00:00 2001 From: Advaith Date: Sat, 21 Nov 2020 06:19:13 -0800 Subject: [PATCH] feat(Message): Stickers (#32) Co-authored-by: Vlad Frangu --- common/index.ts | 2 ++ v8/payloads/channel.ts | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/common/index.ts b/common/index.ts index f35c8c74..d05f6b50 100644 --- a/common/index.ts +++ b/common/index.ts @@ -92,6 +92,8 @@ export enum RESTJSONErrorCodes { CannotDeleteChannelRequiredForCommunityGuilds = 50074, + InvalidStickerSent = 50081, + TwoFactorAuthenticationIsRequired = 60003, ReactionWasBlocked = 90001, diff --git a/v8/payloads/channel.ts b/v8/payloads/channel.ts index d25a4f19..2abe9e39 100644 --- a/v8/payloads/channel.ts +++ b/v8/payloads/channel.ts @@ -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 */