fix: AllowedMentions and AllowedMentionTypes (#1525)
* Give proper values to flag enum * Add zero value * Initialize lists * Update xml docs
This commit is contained in:
@@ -8,17 +8,27 @@ namespace Discord
|
||||
[Flags]
|
||||
public enum AllowedMentionTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// No flag is set.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This flag is not used to control mentions.
|
||||
/// <note type="warning">
|
||||
/// It will always be present and does not mean mentions will not be allowed.
|
||||
/// </note>
|
||||
/// </remarks>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// Controls role mentions.
|
||||
/// </summary>
|
||||
Roles,
|
||||
Roles = 1,
|
||||
/// <summary>
|
||||
/// Controls user mentions.
|
||||
/// </summary>
|
||||
Users,
|
||||
Users = 2,
|
||||
/// <summary>
|
||||
/// Controls <code>@everyone</code> and <code>@here</code> mentions.
|
||||
/// </summary>
|
||||
Everyone,
|
||||
Everyone = 4,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Discord
|
||||
/// flag of the <see cref="AllowedTypes"/> property. If the flag is set, the value of this property
|
||||
/// must be <c>null</c> or empty.
|
||||
/// </summary>
|
||||
public List<ulong> RoleIds { get; set; }
|
||||
public List<ulong> RoleIds { get; set; } = new List<ulong>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of all user ids that will be mentioned.
|
||||
@@ -47,7 +47,7 @@ namespace Discord
|
||||
/// flag of the <see cref="AllowedTypes"/> property. If the flag is set, the value of this property
|
||||
/// must be <c>null</c> or empty.
|
||||
/// </summary>
|
||||
public List<ulong> UserIds { get; set; }
|
||||
public List<ulong> UserIds { get; set; } = new List<ulong>();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AllowedMentions"/> class.
|
||||
|
||||
Reference in New Issue
Block a user