diff --git a/src/Discord.Net.Core/Entities/Messages/AllowedMentions.cs b/src/Discord.Net.Core/Entities/Messages/AllowedMentions.cs index cb18cae90..27ec99845 100644 --- a/src/Discord.Net.Core/Entities/Messages/AllowedMentions.cs +++ b/src/Discord.Net.Core/Entities/Messages/AllowedMentions.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace Discord @@ -7,11 +8,26 @@ namespace Discord /// public class AllowedMentions { + private static readonly Lazy none = new Lazy(() => new AllowedMentions()); + private static readonly Lazy all = new Lazy(() => + new AllowedMentions(AllowedMentionTypes.Everyone | AllowedMentionTypes.Users | AllowedMentionTypes.Roles)); + + /// + /// Gets a value which indicates that no mentions in the message content should notify users. + /// + public static AllowedMentions None => none.Value; + + /// + /// Gets a value which indicates that all mentions in the message content should notify users. + /// + public static AllowedMentions All => all.Value; + /// /// Gets or sets the type of mentions that will be parsed from the message content. /// The flag is mutually exclusive with the /// property, and the flag is mutually exclusive with the /// property. + /// If null, only the Ids specified in and will be mentioned. /// public AllowedMentionTypes? AllowedTypes { get; set; } @@ -30,5 +46,17 @@ namespace Discord /// must be null or empty. /// public List UserIds { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The types of mentions to parse from the message content. + /// If null, only the Ids specified in and will be mentioned. + /// + public AllowedMentions(AllowedMentionTypes? allowedTypes = null) + { + AllowedTypes = allowedTypes; + } } }