Table of Contents

Class AllowedMentions

Namespace
Discord
Assembly
Discord.Net.Core.dll

Defines which mentions and types of mentions that will notify users from the message content.

public class AllowedMentions
Inheritance
AllowedMentions
Inherited Members

Constructors

AllowedMentions(AllowedMentionTypes?)

Initializes a new instance of the AllowedMentions class.

public AllowedMentions(AllowedMentionTypes? allowedTypes = null)

Parameters

allowedTypes AllowedMentionTypes?

The types of mentions to parse from the message content. If null, only the ids specified in UserIds and RoleIds will be mentioned.

Properties

All

Gets a value which indicates that all mentions in the message content should notify users.

public static AllowedMentions All { get; }

Property Value

AllowedMentions

AllowedTypes

Gets or sets the type of mentions that will be parsed from the message content.

public AllowedMentionTypes? AllowedTypes { get; set; }

Property Value

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.

public bool? MentionRepliedUser { get; set; }

Property Value

bool?

Remarks

Specifically for inline replies.

None

Gets a value which indicates that no mentions in the message content should notify users.

public static AllowedMentions None { get; }

Property Value

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.

public List<ulong> RoleIds { get; set; }

Property Value

List<ulong>

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.

public List<ulong> UserIds { get; set; }

Property Value

List<ulong>