Skip to content

Added support for message flags

Mateusz Brawański requested to merge github/fork/Neuheit/messageFlags into master

Created by: Neuheit

Summary

Implemented initial support for Message Flags, documented here: https://discordapp.com/developers/docs/resources/channel#message-object-message-flags. Also changed a few things with the SuppressEmbeds method.

Details

The flags were implemented as an enum of bitwise flags. I also implemented an extension method similar to the Permissions enum, which allows a user to check if a particular flag exists in the sent flags.

Furthermore, I wanted to change the SuppressEmbeds method in both name and in parameter because I did not fully realize what it did when I implemented it. It's now changed to where it can suppress, or unsuppress a message, with a required boolean parameter to determine whether to suppress versus unsuppress.

Changes proposed

  • Implemented the MessageFlags enum, along with the property in DiscordMessage.
  • Added an extension method to make it more efficient to check for a certain Message Flag.
  • Modified the SuppressEmbeds method to better reflect its functionality.

Merge request reports

Loading