Skip to content

Commit

Permalink
feat(Message): Stickers (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
  • Loading branch information
advaith1 and vladfrangu committed Nov 21, 2020
1 parent fde45f9 commit 39ea1f4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export enum RESTJSONErrorCodes {

CannotDeleteChannelRequiredForCommunityGuilds = 50074,

InvalidStickerSent = 50081,

TwoFactorAuthenticationIsRequired = 60003,

ReactionWasBlocked = 90001,
Expand Down
24 changes: 24 additions & 0 deletions v8/payloads/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export interface APIMessage {
message_reference?: APIMessageReference;
flags?: MessageFlags;
referenced_message?: APIMessage | null;
stickers?: APISticker[];
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 39ea1f4

Please sign in to comment.