From 84d70d13fa65abb6a510894c7e44f09dc60520b3 Mon Sep 17 00:00:00 2001 From: ayn2op Date: Sat, 11 Feb 2023 15:02:59 +0530 Subject: [PATCH 1/2] discord: add SuppressNotifications to MessageFlags Related: https://github.com/discord/discord-api-docs/pull/5910 --- discord/message.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/message.go b/discord/message.go index b5d7cbf1..bf80a132 100644 --- a/discord/message.go +++ b/discord/message.go @@ -197,6 +197,10 @@ const ( // MessageLoading specifies whether the message is an Interaction Response // and the bot is "thinking" MessageLoading + // TODO: add FailedToMentionSomeRolesInThread + + // SuppressNotifications specifies whether the message will not trigger push and desktop notifications. + SuppressNotifications = 1 << 12 ) // StickerItem contains partial data of a Sticker. From 0b0ef34b66c8a7780234488bf93a15303c849aea Mon Sep 17 00:00:00 2001 From: ayn2op Date: Sat, 11 Feb 2023 15:04:47 +0530 Subject: [PATCH 2/2] api: add Flags field to SendMessageData struct --- api/send.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/send.go b/api/send.go index dd335f34..b400a283 100644 --- a/api/send.go +++ b/api/send.go @@ -119,6 +119,9 @@ type SendMessageData struct { // guild_id in the reference. However, they are not necessary, but will be // validated if sent. Reference *discord.MessageReference `json:"message_reference,omitempty"` + + // Flags specifies the message flags to set (only `SuppressEmbeds` and `SuppressNotifications` can be set). + Flags discord.MessageFlags `json:"flags,omitempty"` } // NeedsMultipart returns true if the SendMessageData has files.