From 50fff43007d8878a63fa74a2bcb6df9ae122b734 Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Thu, 17 Jun 2021 21:12:20 +0400 Subject: [PATCH 1/2] docs(types): deprecate stickers field in Message --- src/types/messages/message.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/messages/message.ts b/src/types/messages/message.ts index 8478757a4..2edc2be1c 100644 --- a/src/types/messages/message.ts +++ b/src/types/messages/message.ts @@ -78,7 +78,10 @@ export interface Message { messageReference?: Omit; /** Message flags combined as a bitfield */ flags?: number; - /** The stickers sent with the message (bots currently can only receive messages with stickers, not send) */ + /** + * The stickers sent with the message (bots currently can only receive messages with stickers, not send) + * @deprecated + */ stickers?: MessageSticker[]; /** * The message associated with the `message_reference` From 6ea15a6485299142f92d9b69fa918181f465cc49 Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Thu, 17 Jun 2021 21:12:52 +0400 Subject: [PATCH 2/2] fix(types): update MessageSticker fields --- src/types/messages/message_sticker.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/types/messages/message_sticker.ts b/src/types/messages/message_sticker.ts index db42fa3a0..92d477daf 100644 --- a/src/types/messages/message_sticker.ts +++ b/src/types/messages/message_sticker.ts @@ -3,19 +3,20 @@ import type { User } from "../users/user.ts"; /** https://discord.com/developers/docs/resources/channel#message-object-message-sticker-structure */ export interface MessageSticker { - /** id of the sticker */ + /** Id of the sticker */ id: string; - /** id of the pack the sticker is from */ - packId: string; + /** Id of the pack the sticker is from */ + packId?: string; /** Name of the sticker */ name: string; /** Description of the sticker */ description: string; /** For guild stickers, a unicode emoji representing the sticker's expression. For Nitro stickers, a comma-separated list of related expressions */ - tags?: string; + tags: string; /** * Sticker asset hash * Note: The URL for fetching sticker assets is currently private. + * @deprecated the value of the asset field will an empty string. */ asset: string; /** Type of sticker format */