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]
|
[Flags]
|
||||||
public enum AllowedMentionTypes
|
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>
|
/// <summary>
|
||||||
/// Controls role mentions.
|
/// Controls role mentions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Roles,
|
Roles = 1,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls user mentions.
|
/// Controls user mentions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Users,
|
Users = 2,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls <code>@everyone</code> and <code>@here</code> mentions.
|
/// Controls <code>@everyone</code> and <code>@here</code> mentions.
|
||||||
/// </summary>
|
/// </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
|
/// flag of the <see cref="AllowedTypes"/> property. If the flag is set, the value of this property
|
||||||
/// must be <c>null</c> or empty.
|
/// must be <c>null</c> or empty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ulong> RoleIds { get; set; }
|
public List<ulong> RoleIds { get; set; } = new List<ulong>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the list of all user ids that will be mentioned.
|
/// 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
|
/// flag of the <see cref="AllowedTypes"/> property. If the flag is set, the value of this property
|
||||||
/// must be <c>null</c> or empty.
|
/// must be <c>null</c> or empty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ulong> UserIds { get; set; }
|
public List<ulong> UserIds { get; set; } = new List<ulong>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="AllowedMentions"/> class.
|
/// Initializes a new instance of the <see cref="AllowedMentions"/> class.
|
||||||
|
|||||||
Reference in New Issue
Block a user