Class AllowedMentions
Defines which mentions and types of mentions that will notify users from the message content.
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class AllowedMentions : object
Constructors
| Improve this Doc View SourceAllowedMentions(Nullable<AllowedMentionTypes>)
Initializes a new instance of the AllowedMentions class.
Declaration
public AllowedMentions(AllowedMentionTypes? allowedTypes = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<AllowedMentionTypes> | allowedTypes | The types of mentions to parse from the message content. If null, only the ids specified in UserIds and RoleIds will be mentioned. |
Properties
| Improve this Doc View SourceAll
Gets a value which indicates that all mentions in the message content should notify users.
Declaration
public static AllowedMentions All { get; }
Property Value
Type | Description |
---|---|
AllowedMentions |
AllowedTypes
Gets or sets the type of mentions that will be parsed from the message content.
Declaration
public AllowedMentionTypes? AllowedTypes { get; set; }
Property Value
Type | Description |
---|---|
Nullable<AllowedMentionTypes> |
Remarks
The Users flag is mutually exclusive with the UserIds property, and the Roles flag is mutually exclusive with the RoleIds property. If null, only the ids specified in UserIds and RoleIds will be mentioned.
MentionRepliedUser
Gets or sets whether to mention the author of the message you are replying to or not.
Declaration
public bool? MentionRepliedUser { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Remarks
Specifically for inline replies.
None
Gets a value which indicates that no mentions in the message content should notify users.
Declaration
public static AllowedMentions None { get; }
Property Value
Type | Description |
---|---|
AllowedMentions |
RoleIds
Gets or sets the list of all role ids that will be mentioned. This property is mutually exclusive with the Roles flag of the AllowedTypes property. If the flag is set, the value of this property must be null or empty.
Declaration
public List<ulong> RoleIds { get; set; }
Property Value
Type | Description |
---|---|
List<UInt64> |
UserIds
Gets or sets the list of all user ids that will be mentioned. This property is mutually exclusive with the Users flag of the AllowedTypes property. If the flag is set, the value of this property must be null or empty.
Declaration
public List<ulong> UserIds { get; set; }
Property Value
Type | Description |
---|---|
List<UInt64> |