From e13675907301820c5bf3cbb7b63f14be095389af Mon Sep 17 00:00:00 2001
From: Quin Lynch <49576606+quinchs@users.noreply.github.com>
Date: Mon, 9 May 2022 22:56:22 -0300
Subject: [PATCH] feature: Treat warnings as errors and set warning level to 5
(#2270)
---
src/Discord.Net.Commands/Discord.Net.Commands.csproj | 2 ++
src/Discord.Net.Commands/Results/MatchResult.cs | 6 +++---
src/Discord.Net.Core/Discord.Net.Core.csproj | 2 ++
src/Discord.Net.Core/Entities/Guilds/IGuild.cs | 1 -
.../Entities/Guilds/IGuildScheduledEvent.cs | 2 +-
.../Interactions/ApplicationCommandOptionType.cs | 2 +-
.../Entities/Interactions/IDiscordInteraction.cs | 2 +-
.../MessageComponents/ComponentBuilder.cs | 10 +++++-----
.../Entities/Interactions/Modals/ModalBuilder.cs | 8 ++++----
.../Entities/Users/GuildUserProperties.cs | 2 +-
src/Discord.Net.Core/Entities/Users/IGuildUser.cs | 6 +++---
src/Discord.Net.Core/Utils/UrlValidation.cs | 2 +-
.../Attributes/AutocompleteAttribute.cs | 6 +++---
.../Attributes/Modals/ModalInputAttribute.cs | 2 --
.../Attributes/Modals/ModalTextInputAttribute.cs | 2 +-
.../Preconditions/RequireUserPermissionAttribute.cs | 4 ++--
.../Builders/Commands/SlashCommandBuilder.cs | 2 +-
.../Modals/Inputs/TextInputComponentBuilder.cs | 2 +-
.../Builders/Modals/ModalBuilder.cs | 2 +-
.../Builders/ModuleBuilder.cs | 3 ++-
.../Builders/Parameters/ParameterBuilder.cs | 2 +-
.../Discord.Net.Interactions.csproj | 4 +++-
src/Discord.Net.Interactions/InteractionContext.cs | 3 +--
.../InteractionModuleBase.cs | 12 ++++++------
src/Discord.Net.Interactions/InteractionService.cs | 12 ++++++------
.../RestInteractionModuleBase.cs | 4 ++--
.../Results/TypeConverterResult.cs | 2 +-
src/Discord.Net.Rest/Discord.Net.Rest.csproj | 2 ++
src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs | 1 -
.../Entities/Interactions/RestInteraction.cs | 1 -
src/Discord.Net.Rest/Entities/Roles/RestRole.cs | 2 +-
src/Discord.Net.Rest/Net/ED25519/CryptoBytes.cs | 2 +-
src/Discord.Net.Rest/Net/Queue/RequestQueue.cs | 11 +++--------
.../Discord.Net.WebSocket.csproj | 2 ++
.../Entities/Guilds/SocketGuild.cs | 1 -
src/Discord.Net.Webhook/Discord.Net.Webhook.csproj | 2 ++
36 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/src/Discord.Net.Commands/Discord.Net.Commands.csproj b/src/Discord.Net.Commands/Discord.Net.Commands.csproj
index fea719016..4fdecd254 100644
--- a/src/Discord.Net.Commands/Discord.Net.Commands.csproj
+++ b/src/Discord.Net.Commands/Discord.Net.Commands.csproj
@@ -7,6 +7,8 @@
A Discord.Net extension adding support for bot commands.
net6.0;net5.0;net461;netstandard2.0;netstandard2.1
net6.0;net5.0;netstandard2.0;netstandard2.1
+ 5
+ True
diff --git a/src/Discord.Net.Commands/Results/MatchResult.cs b/src/Discord.Net.Commands/Results/MatchResult.cs
index fb266efa6..5b9bfe72b 100644
--- a/src/Discord.Net.Commands/Results/MatchResult.cs
+++ b/src/Discord.Net.Commands/Results/MatchResult.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
namespace Discord.Commands
{
@@ -12,7 +12,7 @@ namespace Discord.Commands
///
/// Gets on which pipeline stage the command may have matched or failed.
///
- public IResult? Pipeline { get; }
+ public IResult Pipeline { get; }
///
public CommandError? Error { get; }
@@ -21,7 +21,7 @@ namespace Discord.Commands
///
public bool IsSuccess => !Error.HasValue;
- private MatchResult(CommandMatch? match, IResult? pipeline, CommandError? error, string errorReason)
+ private MatchResult(CommandMatch? match, IResult pipeline, CommandError? error, string errorReason)
{
Match = match;
Error = error;
diff --git a/src/Discord.Net.Core/Discord.Net.Core.csproj b/src/Discord.Net.Core/Discord.Net.Core.csproj
index 783565e04..41d83bbc8 100644
--- a/src/Discord.Net.Core/Discord.Net.Core.csproj
+++ b/src/Discord.Net.Core/Discord.Net.Core.csproj
@@ -7,6 +7,8 @@
The core components for the Discord.Net library.
net6.0;net5.0;net461;netstandard2.0;netstandard2.1
net6.0;net5.0;netstandard2.0;netstandard2.1
+ 5
+ True
diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
index 4706b629e..775ff9e65 100644
--- a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
+++ b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
@@ -1173,7 +1173,6 @@ namespace Discord
/// in order to use this property.
///
///
- /// A collection of speakers for the event.
/// The location of the event; links are supported
/// The optional banner image for the event.
/// The options to be used when sending the request.
diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuildScheduledEvent.cs b/src/Discord.Net.Core/Entities/Guilds/IGuildScheduledEvent.cs
index 4b2fa3bee..7219682b7 100644
--- a/src/Discord.Net.Core/Entities/Guilds/IGuildScheduledEvent.cs
+++ b/src/Discord.Net.Core/Entities/Guilds/IGuildScheduledEvent.cs
@@ -89,7 +89,7 @@ namespace Discord
/// Gets this events banner image url.
///
/// The format to return.
- /// The size of the image to return in. This can be any power of two between 16 and 2048.
+ /// The size of the image to return in. This can be any power of two between 16 and 2048.
/// The cover images url.
string GetCoverImageUrl(ImageFormat format = ImageFormat.Auto, ushort size = 1024);
diff --git a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
index 5bb00797b..4506b66d9 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs
@@ -56,7 +56,7 @@ namespace Discord
Number = 10,
///
- /// A .
+ /// A .
///
Attachment = 11
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
index 8f6bef995..9017d310f 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs
@@ -55,7 +55,7 @@ namespace Discord
string UserLocale { get; }
///
- /// Gets the preferred locale of the guild this interaction was executed in. if not executed in a guild.
+ /// Gets the preferred locale of the guild this interaction was executed in. if not executed in a guild.
///
///
/// Non-community guilds (With no locale setting available) will have en-US as the default value sent by Discord.
diff --git a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs
index 7becca0e0..9c529f469 100644
--- a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs
@@ -1194,9 +1194,9 @@ namespace Discord
///
/// Gets or sets the default value of the text input.
///
- /// is less than 0.
+ /// .Length is less than 0.
///
- /// is greater than or .
+ /// .Length is greater than or .
///
public string Value
{
@@ -1306,18 +1306,18 @@ namespace Discord
///
/// Sets the minimum length of the current builder.
///
- /// The value to set.
+ /// The value to set.
/// The current builder.
public TextInputBuilder WithMinLength(int minLength)
{
MinLength = minLength;
return this;
}
-
+
///
/// Sets the maximum length of the current builder.
///
- /// The value to set.
+ /// The value to set.
/// The current builder.
public TextInputBuilder WithMaxLength(int maxLength)
{
diff --git a/src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs
index 3a3e3cc49..817f69415 100644
--- a/src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs
@@ -64,18 +64,18 @@ namespace Discord
///
/// Sets the custom id of the current modal.
///
- /// The value to set the custom id to.
+ /// The value to set the custom id to.
/// The current builder.
public ModalBuilder WithCustomId(string customId)
{
CustomId = customId;
return this;
}
-
+
///
/// Adds a component to the current builder.
///
- /// The component to add.
+ /// The component to add.
/// The current builder.
public ModalBuilder AddTextInput(TextInputBuilder component)
{
@@ -213,7 +213,7 @@ namespace Discord
/// Adds a to the at the specific row.
/// If the row cannot accept the component then it will add it to a row that can.
///
- /// The to add.
+ /// The to add.
/// The row to add the text input.
/// There are no more rows to add a text input to.
/// must be less than .
diff --git a/src/Discord.Net.Core/Entities/Users/GuildUserProperties.cs b/src/Discord.Net.Core/Entities/Users/GuildUserProperties.cs
index 935b956c3..5411f5ebf 100644
--- a/src/Discord.Net.Core/Entities/Users/GuildUserProperties.cs
+++ b/src/Discord.Net.Core/Entities/Users/GuildUserProperties.cs
@@ -79,7 +79,7 @@ namespace Discord
/// Sets a timestamp how long a user should be timed out for.
///
///
- /// or a time in the past to clear a currently existing timeout.
+ /// or a time in the past to clear a currently existing timeout.
///
public Optional TimedOutUntil { get; set; }
}
diff --git a/src/Discord.Net.Core/Entities/Users/IGuildUser.cs b/src/Discord.Net.Core/Entities/Users/IGuildUser.cs
index 96de06ed8..9703eafe7 100644
--- a/src/Discord.Net.Core/Entities/Users/IGuildUser.cs
+++ b/src/Discord.Net.Core/Entities/Users/IGuildUser.cs
@@ -104,7 +104,7 @@ namespace Discord
/// Gets the date and time that indicates if and for how long a user has been timed out.
///
///
- /// or a timestamp in the past if the user is not timed out.
+ /// or a timestamp in the past if the user is not timed out.
///
///
/// A indicating how long the user will be timed out for.
@@ -116,7 +116,7 @@ namespace Discord
///
///
/// The following example checks if the current user has the ability to send a message with attachment in
- /// this channel; if so, uploads a file via .
+ /// this channel; if so, uploads a file via .
///
/// if (currentUser?.GetPermissions(targetChannel)?.AttachFiles)
/// await targetChannel.SendFileAsync("fortnite.png");
@@ -151,7 +151,7 @@ namespace Discord
/// If the user does not have a guild avatar, this will be the user's regular avatar.
///
/// The format to return.
- /// The size of the image to return in. This can be any power of two between 16 and 2048.
+ /// The size of the image to return in. This can be any power of two between 16 and 2048.
///
/// A string representing the URL of the displayed avatar for this user. if the user does not have an avatar in place.
///
diff --git a/src/Discord.Net.Core/Utils/UrlValidation.cs b/src/Discord.Net.Core/Utils/UrlValidation.cs
index 8e877bd4e..55ae3bdf7 100644
--- a/src/Discord.Net.Core/Utils/UrlValidation.cs
+++ b/src/Discord.Net.Core/Utils/UrlValidation.cs
@@ -23,7 +23,7 @@ namespace Discord.Utils
///
/// Not full URL validation right now. Just Ensures the protocol is either http, https, or discord
- /// should be used everything other than url buttons.
+ /// should be used everything other than url buttons.
///
/// The URL to validate before sending to discord.
/// A URL must include a protocol (either http, https, or discord).
diff --git a/src/Discord.Net.Interactions/Attributes/AutocompleteAttribute.cs b/src/Discord.Net.Interactions/Attributes/AutocompleteAttribute.cs
index e17c9ff14..c8a3428db 100644
--- a/src/Discord.Net.Interactions/Attributes/AutocompleteAttribute.cs
+++ b/src/Discord.Net.Interactions/Attributes/AutocompleteAttribute.cs
@@ -3,7 +3,7 @@ using System;
namespace Discord.Interactions
{
///
- /// Set the to .
+ /// Set the to .
///
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class AutocompleteAttribute : Attribute
@@ -14,7 +14,7 @@ namespace Discord.Interactions
public Type AutocompleteHandlerType { get; }
///
- /// Set the to and define a to handle
+ /// Set the to and define a to handle
/// Autocomplete interactions targeting the parameter this is applied to.
///
///
@@ -29,7 +29,7 @@ namespace Discord.Interactions
}
///
- /// Set the to without specifying a .
+ /// Set the to without specifying a .
///
public AutocompleteAttribute() { }
}
diff --git a/src/Discord.Net.Interactions/Attributes/Modals/ModalInputAttribute.cs b/src/Discord.Net.Interactions/Attributes/Modals/ModalInputAttribute.cs
index d611b574d..e9b877268 100644
--- a/src/Discord.Net.Interactions/Attributes/Modals/ModalInputAttribute.cs
+++ b/src/Discord.Net.Interactions/Attributes/Modals/ModalInputAttribute.cs
@@ -21,9 +21,7 @@ namespace Discord.Interactions
///
/// Create a new .
///
- /// The label of the input.
/// The custom id of the input.
- /// Whether the user is required to input a value.>
protected ModalInputAttribute(string customId)
{
CustomId = customId;
diff --git a/src/Discord.Net.Interactions/Attributes/Modals/ModalTextInputAttribute.cs b/src/Discord.Net.Interactions/Attributes/Modals/ModalTextInputAttribute.cs
index 35121cd6b..4439e1d84 100644
--- a/src/Discord.Net.Interactions/Attributes/Modals/ModalTextInputAttribute.cs
+++ b/src/Discord.Net.Interactions/Attributes/Modals/ModalTextInputAttribute.cs
@@ -36,7 +36,7 @@ namespace Discord.Interactions
///
/// Create a new .
///
- ///
+ /// The custom id of the text input.>
/// The style of the text input.
/// The placeholder of the text input.
/// The minimum length of the text input's content.
diff --git a/src/Discord.Net.Interactions/Attributes/Preconditions/RequireUserPermissionAttribute.cs b/src/Discord.Net.Interactions/Attributes/Preconditions/RequireUserPermissionAttribute.cs
index 77d6e8f25..0f6ecfc66 100644
--- a/src/Discord.Net.Interactions/Attributes/Preconditions/RequireUserPermissionAttribute.cs
+++ b/src/Discord.Net.Interactions/Attributes/Preconditions/RequireUserPermissionAttribute.cs
@@ -29,7 +29,7 @@ namespace Discord.Interactions
///
/// This precondition will always fail if the command is being invoked in a .
///
- ///
+ ///
/// The that the user must have. Multiple permissions can be
/// specified by ORing the permissions together.
///
@@ -41,7 +41,7 @@ namespace Discord.Interactions
///
/// Requires that the user invoking the command to have a specific .
///
- ///
+ ///
/// The that the user must have. Multiple permissions can be
/// specified by ORing the permissions together.
///
diff --git a/src/Discord.Net.Interactions/Builders/Commands/SlashCommandBuilder.cs b/src/Discord.Net.Interactions/Builders/Commands/SlashCommandBuilder.cs
index cd9bdfc24..c21fd5ae8 100644
--- a/src/Discord.Net.Interactions/Builders/Commands/SlashCommandBuilder.cs
+++ b/src/Discord.Net.Interactions/Builders/Commands/SlashCommandBuilder.cs
@@ -56,7 +56,7 @@ namespace Discord.Interactions.Builders
///
/// Sets .
///
- /// New value of the .
+ /// New value of the .
///
/// The builder instance.
///
diff --git a/src/Discord.Net.Interactions/Builders/Modals/Inputs/TextInputComponentBuilder.cs b/src/Discord.Net.Interactions/Builders/Modals/Inputs/TextInputComponentBuilder.cs
index 340119ddd..8dd2c4004 100644
--- a/src/Discord.Net.Interactions/Builders/Modals/Inputs/TextInputComponentBuilder.cs
+++ b/src/Discord.Net.Interactions/Builders/Modals/Inputs/TextInputComponentBuilder.cs
@@ -41,7 +41,7 @@ namespace Discord.Interactions.Builders
///
/// Sets .
///
- /// New value of the .
+ /// New value of the .
///
/// The builder instance.
///
diff --git a/src/Discord.Net.Interactions/Builders/Modals/ModalBuilder.cs b/src/Discord.Net.Interactions/Builders/Modals/ModalBuilder.cs
index fc1dbdc0e..c13ff40de 100644
--- a/src/Discord.Net.Interactions/Builders/Modals/ModalBuilder.cs
+++ b/src/Discord.Net.Interactions/Builders/Modals/ModalBuilder.cs
@@ -64,7 +64,7 @@ namespace Discord.Interactions.Builders
}
///
- /// Adds text components to .
+ /// Adds text components to .
///
/// Text Component builder factory.
///
diff --git a/src/Discord.Net.Interactions/Builders/ModuleBuilder.cs b/src/Discord.Net.Interactions/Builders/ModuleBuilder.cs
index b7f00025f..0eb91ee6a 100644
--- a/src/Discord.Net.Interactions/Builders/ModuleBuilder.cs
+++ b/src/Discord.Net.Interactions/Builders/ModuleBuilder.cs
@@ -357,7 +357,8 @@ namespace Discord.Interactions.Builders
return this;
}
-
+
+ ///
/// Adds a modal command builder to .
///
/// factory.
diff --git a/src/Discord.Net.Interactions/Builders/Parameters/ParameterBuilder.cs b/src/Discord.Net.Interactions/Builders/Parameters/ParameterBuilder.cs
index 78d007d44..fec1a6ce9 100644
--- a/src/Discord.Net.Interactions/Builders/Parameters/ParameterBuilder.cs
+++ b/src/Discord.Net.Interactions/Builders/Parameters/ParameterBuilder.cs
@@ -122,7 +122,7 @@ namespace Discord.Interactions.Builders
///
/// Adds preconditions to
///
- /// New attributes to be added to .
+ /// New attributes to be added to .
///
/// The builder instance.
///
diff --git a/src/Discord.Net.Interactions/Discord.Net.Interactions.csproj b/src/Discord.Net.Interactions/Discord.Net.Interactions.csproj
index c617eff61..a3ac3d508 100644
--- a/src/Discord.Net.Interactions/Discord.Net.Interactions.csproj
+++ b/src/Discord.Net.Interactions/Discord.Net.Interactions.csproj
@@ -7,8 +7,10 @@
Discord.Interactions
Discord.Net.Interactions
A Discord.Net extension adding support for Application Commands.
+ 5
+ True
-
+
diff --git a/src/Discord.Net.Interactions/InteractionContext.cs b/src/Discord.Net.Interactions/InteractionContext.cs
index 024ab5ef8..b81cc5938 100644
--- a/src/Discord.Net.Interactions/InteractionContext.cs
+++ b/src/Discord.Net.Interactions/InteractionContext.cs
@@ -24,8 +24,7 @@ namespace Discord.Interactions
///
/// The underlying client.
/// The underlying interaction.
- /// who executed the command.
- /// the command originated from.
+ /// the command originated from.
public InteractionContext(IDiscordClient client, IDiscordInteraction interaction, IMessageChannel channel = null)
{
Client = client;
diff --git a/src/Discord.Net.Interactions/InteractionModuleBase.cs b/src/Discord.Net.Interactions/InteractionModuleBase.cs
index 873f4c173..a14779dbb 100644
--- a/src/Discord.Net.Interactions/InteractionModuleBase.cs
+++ b/src/Discord.Net.Interactions/InteractionModuleBase.cs
@@ -45,7 +45,7 @@ namespace Discord.Interactions
protected virtual async Task DeferAsync(bool ephemeral = false, RequestOptions options = null) =>
await Context.Interaction.DeferAsync(ephemeral, options).ConfigureAwait(false);
- ///
+ ///
protected virtual async Task RespondAsync (string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,
AllowedMentions allowedMentions = null, RequestOptions options = null, MessageComponent components = null, Embed embed = null) =>
await Context.Interaction.RespondAsync(text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options).ConfigureAwait(false);
@@ -70,7 +70,7 @@ namespace Discord.Interactions
AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
=> Context.Interaction.RespondWithFilesAsync(attachments, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options);
- ///
+ ///
protected virtual async Task FollowupAsync (string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,
AllowedMentions allowedMentions = null, RequestOptions options = null, MessageComponent components = null, Embed embed = null) =>
await Context.Interaction.FollowupAsync(text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options).ConfigureAwait(false);
@@ -95,7 +95,7 @@ namespace Discord.Interactions
AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
=> Context.Interaction.FollowupWithFilesAsync(attachments, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options);
- ///
+ ///
protected virtual async Task ReplyAsync (string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null,
AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null) =>
await Context.Channel.SendMessageAsync(text, false, embed, options, allowedMentions, messageReference, components).ConfigureAwait(false);
@@ -118,9 +118,9 @@ namespace Discord.Interactions
///
protected virtual async Task RespondWithModalAsync(Modal modal, RequestOptions options = null) => await Context.Interaction.RespondWithModalAsync(modal);
- ///
- protected virtual async Task RespondWithModalAsync(string customId, RequestOptions options = null) where T : class, IModal
- => await Context.Interaction.RespondWithModalAsync(customId, options);
+ ///
+ protected virtual async Task RespondWithModalAsync(string customId, RequestOptions options = null) where TModal : class, IModal
+ => await Context.Interaction.RespondWithModalAsync(customId, options);
//IInteractionModuleBase
diff --git a/src/Discord.Net.Interactions/InteractionService.cs b/src/Discord.Net.Interactions/InteractionService.cs
index 24302dfc7..6afa5c086 100644
--- a/src/Discord.Net.Interactions/InteractionService.cs
+++ b/src/Discord.Net.Interactions/InteractionService.cs
@@ -421,7 +421,7 @@ namespace Discord.Interactions
///
///
/// Commands will be registered as standalone commands, if you want the to take effect,
- /// use . Registering a commands without group names might cause the command traversal to fail.
+ /// use . Registering a commands without group names might cause the command traversal to fail.
///
/// The target guild.
/// Commands to be registered to Discord.
@@ -517,7 +517,7 @@ namespace Discord.Interactions
///
///
/// Commands will be registered as standalone commands, if you want the to take effect,
- /// use . Registering a commands without group names might cause the command traversal to fail.
+ /// use . Registering a commands without group names might cause the command traversal to fail.
///
/// Commands to be registered to Discord.
///
@@ -965,7 +965,7 @@ namespace Discord.Interactions
/// Removes a type reader for the given type.
///
///
- /// Removing a from the will not dereference the from the loaded module/command instances.
+ /// Removing a from the will not dereference the from the loaded module/command instances.
/// You need to reload the modules for the changes to take effect.
///
/// The type to remove the reader from.
@@ -978,7 +978,7 @@ namespace Discord.Interactions
/// Removes a generic type reader from the type .
///
///
- /// Removing a from the will not dereference the from the loaded module/command instances.
+ /// Removing a from the will not dereference the from the loaded module/command instances.
/// You need to reload the modules for the changes to take effect.
///
/// The type to remove the readers from.
@@ -991,7 +991,7 @@ namespace Discord.Interactions
/// Removes a generic type reader from the given type.
///
///
- /// Removing a from the will not dereference the from the loaded module/command instances.
+ /// Removing a from the will not dereference the from the loaded module/command instances.
/// You need to reload the modules for the changes to take effect.
///
/// The type to remove the reader from.
@@ -1004,7 +1004,7 @@ namespace Discord.Interactions
/// Serialize an object using a into a to be placed in a Component CustomId.
///
///
- /// Removing a from the will not dereference the from the loaded module/command instances.
+ /// Removing a from the will not dereference the from the loaded module/command instances.
/// You need to reload the modules for the changes to take effect.
///
/// Type of the object to be serialized.
diff --git a/src/Discord.Net.Interactions/RestInteractionModuleBase.cs b/src/Discord.Net.Interactions/RestInteractionModuleBase.cs
index e83c91fef..b570e6d84 100644
--- a/src/Discord.Net.Interactions/RestInteractionModuleBase.cs
+++ b/src/Discord.Net.Interactions/RestInteractionModuleBase.cs
@@ -87,12 +87,12 @@ namespace Discord.Interactions
await InteractionService._restResponseCallback(Context, payload).ConfigureAwait(false);
}
- protected override async Task RespondWithModalAsync(string customId, RequestOptions options = null)
+ protected override async Task RespondWithModalAsync(string customId, RequestOptions options = null)
{
if (Context.Interaction is not RestInteraction restInteraction)
throw new InvalidOperationException($"Invalid interaction type. Interaction must be a type of {nameof(RestInteraction)} in order to execute this method");
- var payload = restInteraction.RespondWithModal(customId, options);
+ var payload = restInteraction.RespondWithModal(customId, options);
if (Context is IRestInteractionContext restContext && restContext.InteractionResponseCallback != null)
await restContext.InteractionResponseCallback.Invoke(payload).ConfigureAwait(false);
diff --git a/src/Discord.Net.Interactions/Results/TypeConverterResult.cs b/src/Discord.Net.Interactions/Results/TypeConverterResult.cs
index bd89bf6b7..a9a12ee33 100644
--- a/src/Discord.Net.Interactions/Results/TypeConverterResult.cs
+++ b/src/Discord.Net.Interactions/Results/TypeConverterResult.cs
@@ -3,7 +3,7 @@ using System;
namespace Discord.Interactions
{
///
- /// Represents a result type for .
+ /// Represents a result type for .
///
public struct TypeConverterResult : IResult
{
diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.csproj b/src/Discord.Net.Rest/Discord.Net.Rest.csproj
index 98692998f..bec2396ef 100644
--- a/src/Discord.Net.Rest/Discord.Net.Rest.csproj
+++ b/src/Discord.Net.Rest/Discord.Net.Rest.csproj
@@ -7,6 +7,8 @@
A core Discord.Net library containing the REST client and models.
net6.0;net5.0;net461;netstandard2.0;netstandard2.1
net6.0;net5.0;netstandard2.0;netstandard2.1
+ 5
+ True
diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
index 92d598466..974ea69ad 100644
--- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
+++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
@@ -1161,7 +1161,6 @@ namespace Discord.Rest
/// in order to use this property.
///
///
- /// A collection of speakers for the event.
/// The location of the event; links are supported
/// The optional banner image for the event.
/// The options to be used when sending the request.
diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestInteraction.cs b/src/Discord.Net.Rest/Entities/Interactions/RestInteraction.cs
index 8a8921abe..b8c0f961d 100644
--- a/src/Discord.Net.Rest/Entities/Interactions/RestInteraction.cs
+++ b/src/Discord.Net.Rest/Entities/Interactions/RestInteraction.cs
@@ -333,7 +333,6 @@ namespace Discord.Rest
=> await FollowupWithFilesAsync(attachments, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options).ConfigureAwait(false);
///
Task IDiscordInteraction.RespondWithFilesAsync(IEnumerable attachments, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options) => throw new NotSupportedException("REST-Based interactions don't support files.");
- ///
#if NETCOREAPP3_0_OR_GREATER != true
///
Task IDiscordInteraction.RespondWithFileAsync(Stream fileStream, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options) => throw new NotSupportedException("REST-Based interactions don't support files.");
diff --git a/src/Discord.Net.Rest/Entities/Roles/RestRole.cs b/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
index a2ad4fd77..df629bec7 100644
--- a/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
+++ b/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
@@ -25,7 +25,7 @@ namespace Discord.Rest
public string Name { get; private set; }
///
public string Icon { get; private set; }
- /// />
+ ///
public Emoji Emoji { get; private set; }
///
public GuildPermissions Permissions { get; private set; }
diff --git a/src/Discord.Net.Rest/Net/ED25519/CryptoBytes.cs b/src/Discord.Net.Rest/Net/ED25519/CryptoBytes.cs
index cfd64104d..43cd3f902 100644
--- a/src/Discord.Net.Rest/Net/ED25519/CryptoBytes.cs
+++ b/src/Discord.Net.Rest/Net/ED25519/CryptoBytes.cs
@@ -243,7 +243,7 @@ namespace Discord.Net.ED25519
///
/// // Decode a base58-encoded string into byte array
///
- /// Base58 data string
+ /// Base58 data string
/// Byte array
public static byte[] Base58Decode(string input)
{
diff --git a/src/Discord.Net.Rest/Net/Queue/RequestQueue.cs b/src/Discord.Net.Rest/Net/Queue/RequestQueue.cs
index 75e79eec2..4915a5c39 100644
--- a/src/Discord.Net.Rest/Net/Queue/RequestQueue.cs
+++ b/src/Discord.Net.Rest/Net/Queue/RequestQueue.cs
@@ -60,14 +60,9 @@ namespace Discord.Net.Queue
_clearToken?.Cancel();
_clearToken?.Dispose();
_clearToken = new CancellationTokenSource();
- if (_parentToken != null)
- {
- _requestCancelTokenSource?.Dispose();
- _requestCancelTokenSource = CancellationTokenSource.CreateLinkedTokenSource(_clearToken.Token, _parentToken);
- _requestCancelToken = _requestCancelTokenSource.Token;
- }
- else
- _requestCancelToken = _clearToken.Token;
+ _requestCancelTokenSource?.Dispose();
+ _requestCancelTokenSource = CancellationTokenSource.CreateLinkedTokenSource(_clearToken.Token, _parentToken);
+ _requestCancelToken = _requestCancelTokenSource.Token;
}
finally { _tokenLock.Release(); }
}
diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj
index 2ce89be5b..a4355bc02 100644
--- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj
+++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj
@@ -8,6 +8,8 @@
net6.0;net5.0;net461;netstandard2.0;netstandard2.1
net6.0;net5.0;netstandard2.0;netstandard2.1
true
+ 5
+ True
diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
index 8b376b3ed..e12f3d1ef 100644
--- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
+++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
@@ -1291,7 +1291,6 @@ namespace Discord.WebSocket
/// in order to use this property.
///
///
- /// A collection of speakers for the event.
/// The location of the event; links are supported
/// The optional banner image for the event.
/// The options to be used when sending the request.
diff --git a/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj b/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj
index df920b7dc..1e3c3f7f8 100644
--- a/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj
+++ b/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj
@@ -6,6 +6,8 @@
Discord.Webhook
A core Discord.Net library containing the Webhook client and models.
net6.0;net5.0;netstandard2.0;netstandard2.1
+ 5
+ True