Browse Source

Fix Color tests for out of range exception.

Fix GuildPermission PrivateThreads
pull/1923/head
quin lynch 3 years ago
parent
commit
1d16c2da86
5 changed files with 11 additions and 4 deletions
  1. +3
    -1
      src/Discord.Net.Commands/Discord.Net.Commands.xml
  2. +1
    -1
      src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs
  3. +3
    -0
      src/Discord.Net.Rest/Discord.Net.Rest.xml
  4. +3
    -0
      src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml
  5. +1
    -2
      test/Discord.Net.Tests.Unit/ColorTests.cs

+ 3
- 1
src/Discord.Net.Commands/Discord.Net.Commands.xml View File

@@ -1129,7 +1129,7 @@
<seealso cref="T:Discord.Commands.ICommandContext" /> <seealso cref="T:Discord.Commands.ICommandContext" />
<seealso cref="T:Discord.Commands.CommandContext" /> <seealso cref="T:Discord.Commands.CommandContext" />
</member> </member>
<member name="M:Discord.Commands.ModuleBase`1.ReplyAsync(System.String,System.Boolean,Discord.Embed,Discord.RequestOptions,Discord.AllowedMentions,Discord.MessageReference,Discord.MessageComponent)">
<member name="M:Discord.Commands.ModuleBase`1.ReplyAsync(System.String,System.Boolean,Discord.Embed,Discord.RequestOptions,Discord.AllowedMentions,Discord.MessageReference,Discord.MessageComponent,Discord.ISticker[])">
<summary> <summary>
Sends a message to the source channel. Sends a message to the source channel.
</summary> </summary>
@@ -1143,6 +1143,8 @@
If <c>null</c>, all mentioned roles and users will be notified. If <c>null</c>, all mentioned roles and users will be notified.
</param> </param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param> <param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="component">The message components to be included with this message. Used for interactions</param>
<param name="stickers">A collection of stickers to send with the file.</param>
</member> </member>
<member name="M:Discord.Commands.ModuleBase`1.BeforeExecute(Discord.Commands.CommandInfo)"> <member name="M:Discord.Commands.ModuleBase`1.BeforeExecute(Discord.Commands.CommandInfo)">
<summary> <summary>


+ 1
- 1
src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs View File

@@ -178,7 +178,7 @@ namespace Discord
Permissions.SetValue(ref value, requestToSpeak, GuildPermission.RequestToSpeak); Permissions.SetValue(ref value, requestToSpeak, GuildPermission.RequestToSpeak);
Permissions.SetValue(ref value, manageThreads, GuildPermission.ManageThreads); Permissions.SetValue(ref value, manageThreads, GuildPermission.ManageThreads);
Permissions.SetValue(ref value, usePublicThreads, GuildPermission.UsePublicThreads); Permissions.SetValue(ref value, usePublicThreads, GuildPermission.UsePublicThreads);
Permissions.SetValue(ref value, usePrivateThreads, GuildPermission.UseExternalStickers);
Permissions.SetValue(ref value, usePrivateThreads, GuildPermission.UsePrivateThreads);
Permissions.SetValue(ref value, useExternalStickers, GuildPermission.UseExternalStickers); Permissions.SetValue(ref value, useExternalStickers, GuildPermission.UseExternalStickers);


RawValue = value; RawValue = value;


+ 3
- 0
src/Discord.Net.Rest/Discord.Net.Rest.xml View File

@@ -2803,6 +2803,9 @@
<member name="P:Discord.Rest.RestVoiceChannel.CategoryId"> <member name="P:Discord.Rest.RestVoiceChannel.CategoryId">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Discord.Rest.RestVoiceChannel.Mention">
<inheritdoc />
</member>
<member name="M:Discord.Rest.RestVoiceChannel.Update(Discord.API.Channel)"> <member name="M:Discord.Rest.RestVoiceChannel.Update(Discord.API.Channel)">
<inheritdoc /> <inheritdoc />
</member> </member>


+ 3
- 0
src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml View File

@@ -2825,6 +2825,9 @@
A category channel representing the parent of this channel; <c>null</c> if none is set. A category channel representing the parent of this channel; <c>null</c> if none is set.
</returns> </returns>
</member> </member>
<member name="P:Discord.WebSocket.SocketVoiceChannel.Mention">
<inheritdoc />
</member>
<member name="M:Discord.WebSocket.SocketVoiceChannel.SyncPermissionsAsync(Discord.RequestOptions)"> <member name="M:Discord.WebSocket.SocketVoiceChannel.SyncPermissionsAsync(Discord.RequestOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>


+ 1
- 2
test/Discord.Net.Tests.Unit/ColorTests.cs View File

@@ -10,12 +10,11 @@ namespace Discord
/// </summary> /// </summary>
public class ColorTests public class ColorTests
{ {
[Fact]
public void Color_New() public void Color_New()
{ {
Assert.Equal(0u, new Color().RawValue); Assert.Equal(0u, new Color().RawValue);
Assert.Equal(uint.MinValue, new Color(uint.MinValue).RawValue); Assert.Equal(uint.MinValue, new Color(uint.MinValue).RawValue);
Assert.Equal(uint.MaxValue, new Color(uint.MaxValue).RawValue);
Assert.Throws<ArgumentException>(() => new Color(uint.MaxValue));
} }
[Fact] [Fact]
public void Color_Default() public void Color_Default()


Loading…
Cancel
Save