diff --git a/twilight-http/src/request/channel/message/create_message.rs b/twilight-http/src/request/channel/message/create_message.rs index 811f2b8cfd8..1bf86040e5a 100644 --- a/twilight-http/src/request/channel/message/create_message.rs +++ b/twilight-http/src/request/channel/message/create_message.rs @@ -238,9 +238,11 @@ impl<'a> CreateMessage<'a> { /// Set the message's flags. /// - /// The only supported flag is [`SUPPRESS_EMBEDS`]. + /// The only supported flags are [`SUPPRESS_EMBEDS`] and + /// [`SUPPRESS_NOTIFICATIONS`]. /// /// [`SUPPRESS_EMBEDS`]: MessageFlags::SUPPRESS_EMBEDS + /// [`SUPPRESS_NOTIFICATIONS`]: MessageFlags::SUPPRESS_NOTIFICATIONS pub const fn flags(mut self, flags: MessageFlags) -> Self { self.fields.flags = Some(flags); diff --git a/twilight-http/src/request/channel/thread/create_forum_thread/message.rs b/twilight-http/src/request/channel/thread/create_forum_thread/message.rs index 086deaa8eb3..d0d4cfaba81 100644 --- a/twilight-http/src/request/channel/thread/create_forum_thread/message.rs +++ b/twilight-http/src/request/channel/thread/create_forum_thread/message.rs @@ -152,9 +152,11 @@ impl<'a> CreateForumThreadMessage<'a> { /// Set the message's flags. /// - /// The only supported flag is [`SUPPRESS_EMBEDS`]. + /// The only supported flags are [`SUPPRESS_EMBEDS`] and + /// [`SUPPRESS_NOTIFICATIONS`]. /// /// [`SUPPRESS_EMBEDS`]: MessageFlags::SUPPRESS_EMBEDS + /// [`SUPPRESS_NOTIFICATIONS`]: MessageFlags::SUPPRESS_NOTIFICATIONS pub const fn flags(mut self, flags: MessageFlags) -> Self { self.0.fields.message.flags = Some(flags); diff --git a/twilight-model/src/channel/message/flags.rs b/twilight-model/src/channel/message/flags.rs index 070f7da5bdd..7c3167d3fb0 100644 --- a/twilight-model/src/channel/message/flags.rs +++ b/twilight-model/src/channel/message/flags.rs @@ -31,6 +31,8 @@ bitflags! { /// This message failed to mention some roles in a thread, which /// subsequently failed to add the role's members to the thread. const FAILED_TO_MENTION_SOME_ROLES_IN_THREAD = 1 << 8; + /// This message will not trigger push and desktop notifications. + const SUPPRESS_NOTIFICATIONS = 1 << 12; } } @@ -104,6 +106,7 @@ mod tests { MessageFlags::FAILED_TO_MENTION_SOME_ROLES_IN_THREAD.bits(), 1 << 8 ); + const_assert_eq!(MessageFlags::SUPPRESS_NOTIFICATIONS.bits(), 1 << 12); #[test] fn serde() {