From 90986e991d07544178b2d5390e62edead9471612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Hjorth=C3=B8j?= Date: Sun, 3 Oct 2021 15:39:22 +0200 Subject: [PATCH] Spelling corrections (#215) --- samples/02_commands_framework/Program.cs | 2 +- .../Services/CommandHandlingService.cs | 2 +- src/Discord.Net.Commands/Attributes/AliasAttribute.cs | 2 +- .../Builders/ModuleClassBuilder.cs | 2 +- src/Discord.Net.Commands/CommandService.cs | 2 +- src/Discord.Net.Commands/ModuleBase.cs | 2 +- src/Discord.Net.Commands/RunMode.cs | 2 +- src/Discord.Net.Core/Entities/Guilds/IGuild.cs | 8 ++++---- .../Context Menus/MessageCommandBuilder.cs | 2 +- .../Interactions/Context Menus/UserCommandBuilder.cs | 2 +- .../Entities/Interactions/IApplicationCommandOption.cs | 2 +- .../Entities/Interactions/IDiscordInteraction.cs | 4 ++-- .../Entities/Interactions/IDiscordInteractionData.cs | 2 +- .../Entities/Interactions/InteractionResponseType.cs | 4 ++-- .../Interactions/Slash Commands/SlashCommandBuilder.cs | 10 +++++----- .../Slash Commands/SlashCommandProperties.cs | 2 +- src/Discord.Net.Core/Entities/Messages/IMessage.cs | 2 +- src/Discord.Net.Core/Entities/Messages/TimestampTag.cs | 2 +- .../Entities/Permissions/ChannelPermissions.cs | 4 ++-- .../Entities/Permissions/GuildPermissions.cs | 2 +- .../Entities/Permissions/OverwritePermissions.cs | 2 +- .../Entities/Stickers/ICustomSticker.cs | 2 +- src/Discord.Net.Core/Extensions/MessageExtensions.cs | 4 ++-- src/Discord.Net.Core/Format.cs | 2 +- src/Discord.Net.Core/RequestOptions.cs | 4 ++-- .../Core/Entities/Channels/IMessageChannel.Examples.cs | 1 - src/Discord.Net.Rest/DiscordRestApiClient.cs | 2 +- .../Entities/Channels/RestThreadChannel.cs | 6 +++--- src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs | 8 ++++---- .../Entities/Interactions/InteractionHelper.cs | 1 - .../Entities/Messages/CustomSticker.cs | 2 +- .../Entities/Messages/RestFollowupMessage.cs | 4 ++-- .../Entities/Messages/RestInteractionMessage.cs | 4 ++-- .../Entities/Webhooks/WebhookHelper.cs | 1 - src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs | 4 ++-- src/Discord.Net.WebSocket/API/Voice/ReadyEvent.cs | 2 +- .../Audio/Streams/BufferedWriteStream.cs | 2 +- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 6 +++--- src/Discord.Net.WebSocket/DiscordSocketConfig.cs | 2 +- .../Entities/Channels/SocketStageChannel.cs | 2 +- .../Entities/Guilds/SocketGuild.cs | 2 +- .../Message Commands/SocketMessageCommandData.cs | 2 +- .../Message Components/SocketMessageComponent.cs | 4 ++-- .../Slash Commands/SocketAutocompleteInteraction.cs | 2 +- .../SocketAutocompleteInteractionData.cs | 2 +- .../Slash Commands/SocketSlashCommandDataOption.cs | 2 +- .../Entities/Interaction/SocketInteraction.cs | 2 +- .../Entities/Stickers/SocketCustomSticker.cs | 2 +- test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs | 2 +- test/Discord.Net.Tests.Unit/FormatTests.cs | 2 +- 50 files changed, 70 insertions(+), 73 deletions(-) diff --git a/samples/02_commands_framework/Program.cs b/samples/02_commands_framework/Program.cs index 67cb87764..8a2f37dce 100644 --- a/samples/02_commands_framework/Program.cs +++ b/samples/02_commands_framework/Program.cs @@ -39,7 +39,7 @@ namespace _02_commands_framework services.GetRequiredService().Log += LogAsync; // Tokens should be considered secret data and never hard-coded. - // We can read from the environment variable to avoid hardcoding. + // We can read from the environment variable to avoid hard coding. await client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("token")); await client.StartAsync(); diff --git a/samples/03_sharded_client/Services/CommandHandlingService.cs b/samples/03_sharded_client/Services/CommandHandlingService.cs index 1230cbcff..adc91b12c 100644 --- a/samples/03_sharded_client/Services/CommandHandlingService.cs +++ b/samples/03_sharded_client/Services/CommandHandlingService.cs @@ -54,7 +54,7 @@ namespace _03_sharded_client.Services if (!command.IsSpecified) return; - // the command was succesful, we don't care about this result, unless we want to log that a command succeeded. + // the command was successful, we don't care about this result, unless we want to log that a command succeeded. if (result.IsSuccess) return; diff --git a/src/Discord.Net.Commands/Attributes/AliasAttribute.cs b/src/Discord.Net.Commands/Attributes/AliasAttribute.cs index 16eb3ba73..c4b78f534 100644 --- a/src/Discord.Net.Commands/Attributes/AliasAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/AliasAttribute.cs @@ -16,7 +16,7 @@ namespace Discord.Commands /// /// [Command("stats")] /// [Alias("stat", "info")] - /// public async Task GetStatsAsync(IUser user) + /// public Task GetStatsAsync(IUser user) /// { /// // ...pull stats /// } diff --git a/src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs b/src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs index 59500439a..8c10ae806 100644 --- a/src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs +++ b/src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs @@ -291,7 +291,7 @@ namespace Discord.Commands return reader; } - //We dont have a cached type reader, create one + //We don't have a cached type reader, create one reader = ReflectionUtils.CreateObject(typeReaderType.GetTypeInfo(), service, services); service.AddTypeReader(paramType, reader, false); diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index 468f7739f..db08d0d79 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -602,7 +602,7 @@ namespace Discord.Commands //If we get this far, at least one parse was successful. Execute the most likely overload. var chosenOverload = successfulParses[0]; var result = await chosenOverload.Key.ExecuteAsync(context, chosenOverload.Value, services).ConfigureAwait(false); - if (!result.IsSuccess && !(result is RuntimeResult || result is ExecuteResult)) // succesful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deffered execution) + if (!result.IsSuccess && !(result is RuntimeResult || result is ExecuteResult)) // successful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deferred execution) await _commandExecutedEvent.InvokeAsync(chosenOverload.Key.Command, context, result); return result; } diff --git a/src/Discord.Net.Commands/ModuleBase.cs b/src/Discord.Net.Commands/ModuleBase.cs index eb517e65d..3eddc11d2 100644 --- a/src/Discord.Net.Commands/ModuleBase.cs +++ b/src/Discord.Net.Commands/ModuleBase.cs @@ -36,7 +36,7 @@ namespace Discord.Commands /// Specifies if notifications are sent for mentioned users and roles in the . /// If null, all mentioned roles and users will be notified. /// - /// The request options for this async request. + /// The request options for this request. /// The message references to be included. Used to reply to specific messages. /// The message components to be included with this message. Used for interactions. /// A collection of stickers to send with the file. diff --git a/src/Discord.Net.Commands/RunMode.cs b/src/Discord.Net.Commands/RunMode.cs index 8e230b500..d6b49065b 100644 --- a/src/Discord.Net.Commands/RunMode.cs +++ b/src/Discord.Net.Commands/RunMode.cs @@ -8,7 +8,7 @@ namespace Discord.Commands public enum RunMode { /// - /// The default behaviour set in . + /// The default behavior set in . /// Default, /// diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs index 9b5d6b23a..275879a2c 100644 --- a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs +++ b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs @@ -609,12 +609,12 @@ namespace Discord /// Task GetRulesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); /// - /// Gets the text channel channel where admins and moderators of Community guilds receive notices from Discord. + /// Gets the text channel where admins and moderators of Community guilds receive notices from Discord. /// /// The that determines whether the object should be fetched from cache. /// The options to be used when sending the request. /// - /// A task that represents the asynchronous get operation. The task result contains the text channel channel where + /// A task that represents the asynchronous get operation. The task result contains the text channel where /// admins and moderators of Community guilds receive notices from Discord; if none is set. /// Task GetPublicUpdatesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); @@ -834,7 +834,7 @@ namespace Discord /// Downloads all users for this guild if the current list is incomplete. /// /// - /// This method downloads all users found within this guild throught the Gateway and caches them. + /// This method downloads all users found within this guild through the Gateway and caches them. /// /// /// A task that represents the asynchronous download operation. @@ -1057,7 +1057,7 @@ namespace Discord /// A task that represents the asynchronous get operation. The task result contains a read-only collection /// of application commands found within the guild. /// - Task> GetApplicationCommandsAsync (RequestOptions options = null); + Task> GetApplicationCommandsAsync(RequestOptions options = null); /// /// Gets an application command within this guild with the specified id. diff --git a/src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs index 495301d00..c6433e969 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs @@ -13,7 +13,7 @@ namespace Discord public class MessageCommandBuilder { /// - /// Returns the maximun length a commands name allowed by Discord + /// Returns the maximum length a commands name allowed by Discord /// public const int MaxNameLength = 32; diff --git a/src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs index 075843756..797437476 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs @@ -13,7 +13,7 @@ namespace Discord public class UserCommandBuilder { /// - /// Returns the maximun length a commands name allowed by Discord + /// Returns the maximum length a commands name allowed by Discord /// public const int MaxNameLength = 32; diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs index 0fc7fb4a3..fe2a1d597 100644 --- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs +++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs @@ -22,7 +22,7 @@ namespace Discord string Name { get; } /// - /// The discription of this command option, 1-100 character description. + /// The description of this command option, 1-100 character description. /// string Description { get; } diff --git a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs index 0dea203ef..572e52a7e 100644 --- a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs +++ b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteraction.cs @@ -74,7 +74,7 @@ namespace Discord /// /// Gets the original response for this interaction. /// - /// The request options for this async request. + /// The request options for this request. /// A that represents the initial response. Task GetOriginalResponseAsync (RequestOptions options = null); @@ -82,7 +82,7 @@ namespace Discord /// Edits original response for this interaction. /// /// A delegate containing the properties to modify the message with. - /// The request options for this async request. + /// The request options for this request. /// A that represents the initial response. Task ModifyOriginalResponseAsync (Action func, RequestOptions options = null); diff --git a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteractionData.cs b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteractionData.cs index 7083810b7..f55b46869 100644 --- a/src/Discord.Net.Core/Entities/Interactions/IDiscordInteractionData.cs +++ b/src/Discord.Net.Core/Entities/Interactions/IDiscordInteractionData.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Discord { /// - /// Represents an interface used to specify classes that they are a vaild dataype of a class. + /// Represents an interface used to specify classes that they are a vaild data type of a class. /// public interface IDiscordInteractionData { } } diff --git a/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs b/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs index de30ad868..20f052f8a 100644 --- a/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs +++ b/src/Discord.Net.Core/Entities/Interactions/InteractionResponseType.cs @@ -25,13 +25,13 @@ namespace Discord /// /// ACK a command without sending a message, eating the user's input. /// - [Obsolete("This response type has been depricated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] + [Obsolete("This response type has been deprecated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] Acknowledge = 2, /// /// Respond with a message, showing the user's input. /// - [Obsolete("This response type has been depricated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] + [Obsolete("This response type has been deprecated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] ChannelMessage = 3, /// diff --git a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs index 624a7399b..3dca6a8d6 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs @@ -13,7 +13,7 @@ namespace Discord public class SlashCommandBuilder { /// - /// Returns the maximun length a commands name allowed by Discord + /// Returns the maximum length a commands name allowed by Discord /// public const int MaxNameLength = 32; /// @@ -178,7 +178,7 @@ namespace Discord // Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, // https://discord.com/developers/docs/interactions/slash-commands#applicationcommand if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) - throw new ArgumentException("Command name cannot contian any special characters or whitespaces!", nameof(name)); + throw new ArgumentException("Command name cannot contain any special characters or whitespaces!", nameof(name)); // same with description Preconditions.NotNullOrEmpty(description, nameof(description)); @@ -213,7 +213,7 @@ namespace Discord /// /// The name of the option to add. /// The type of this option. - /// The sescription of this option. + /// The description of this option. /// The current builder. public SlashCommandBuilder AddOption(string name, ApplicationCommandOptionType type, string description) => AddOption(name, type, description, options: null, choices: null); @@ -294,7 +294,7 @@ namespace Discord if (value != null) if (!Regex.IsMatch(value, @"^[\w-]{1,32}$")) - throw new ArgumentException("Option name cannot contian any special characters or whitespaces!"); + throw new ArgumentException("Option name cannot contain any special characters or whitespaces!"); _name = value; } @@ -397,7 +397,7 @@ namespace Discord // Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, // https://discord.com/developers/docs/interactions/slash-commands#applicationcommand if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) - throw new ArgumentException("Command name cannot contian any special characters or whitespaces!", nameof(name)); + throw new ArgumentException("Command name cannot contain any special characters or whitespaces!", nameof(name)); // same with description Preconditions.NotNullOrEmpty(description, nameof(description)); diff --git a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandProperties.cs b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandProperties.cs index e9b7222d4..542170b94 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandProperties.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandProperties.cs @@ -13,7 +13,7 @@ namespace Discord { internal override ApplicationCommandType Type => ApplicationCommandType.Slash; /// - /// The discription of this command. + /// The description of this command. /// public Optional Description { get; set; } diff --git a/src/Discord.Net.Core/Entities/Messages/IMessage.cs b/src/Discord.Net.Core/Entities/Messages/IMessage.cs index c9bcb5f59..af88554e7 100644 --- a/src/Discord.Net.Core/Entities/Messages/IMessage.cs +++ b/src/Discord.Net.Core/Entities/Messages/IMessage.cs @@ -56,7 +56,7 @@ namespace Discord /// Gets the clean content for this message. /// /// - /// A string that contains the body of the message stripped of mentions, markdown, emojiis and pings; note that this field may be empty if there is an embed. + /// A string that contains the body of the message stripped of mentions, markdown, emojis and pings; note that this field may be empty if there is an embed. /// string CleanContent { get; } /// diff --git a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs index 829b35098..21d30456f 100644 --- a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs +++ b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs @@ -27,7 +27,7 @@ namespace Discord /// If the is null then the default 0 will be used. /// /// - /// A string thats compatable in a discord message, ex: <t:1625944201:f> + /// A string thats compatible in a discord message, ex: <t:1625944201:f> public override string ToString() { if (Time == null) diff --git a/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs b/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs index 11130731e..ee5c9984a 100644 --- a/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs +++ b/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs @@ -85,7 +85,7 @@ namespace Discord /// If true, a user may stream video in a voice channel. public bool Stream => Permissions.GetValue(RawValue, ChannelPermission.Stream); - /// If true, a user may adjust role permissions. This also implictly grants all other permissions. + /// If true, a user may adjust role permissions. This also implicitly grants all other permissions. public bool ManageRoles => Permissions.GetValue(RawValue, ChannelPermission.ManageRoles); /// If true, a user may edit the webhooks for this channel. public bool ManageWebhooks => Permissions.GetValue(RawValue, ChannelPermission.ManageWebhooks); @@ -103,7 +103,7 @@ namespace Discord public bool UseExternalStickers => Permissions.GetValue(RawValue, ChannelPermission.UseExternalStickers); /// If true, a user may send messages in threads in this guild. public bool SendMessagesInThreads => Permissions.GetValue(RawValue, ChannelPermission.SendMessagesInThreads); - /// If true, a user launch application activites in voice channels in this guild. + /// If true, a user launch application activities in voice channels in this guild. public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, ChannelPermission.StartEmbeddedActivities); /// Creates a new with the provided packed value. diff --git a/src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs b/src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs index 8924936a0..31f74ea22 100644 --- a/src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs +++ b/src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs @@ -97,7 +97,7 @@ namespace Discord public bool UseExternalStickers => Permissions.GetValue(RawValue, GuildPermission.UseExternalStickers); /// If true, a user may send messages in threads in this guild. public bool SendMessagesInThreads => Permissions.GetValue(RawValue, GuildPermission.SendMessagesInThreads); - /// If true, a user launch application activites in voice channels in this guild. + /// If true, a user launch application activities in voice channels in this guild. public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, GuildPermission.StartEmbeddedActivities); /// Creates a new with the provided packed value. diff --git a/src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs b/src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs index cff938465..0e634ad1a 100644 --- a/src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs +++ b/src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs @@ -97,7 +97,7 @@ namespace Discord public PermValue UseExternalStickers => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.UseExternalStickers); /// If true, a user may send messages in threads in this guild. public PermValue SendMessagesInThreads => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.SendMessagesInThreads); - /// If true, a user launch application activites in voice channels in this guild. + /// If true, a user launch application activities in voice channels in this guild. public PermValue StartEmbeddedActivities => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.StartEmbeddedActivities); /// Creates a new OverwritePermissions with the provided allow and deny packed values. diff --git a/src/Discord.Net.Core/Entities/Stickers/ICustomSticker.cs b/src/Discord.Net.Core/Entities/Stickers/ICustomSticker.cs index 03f4ac2eb..ff06a4342 100644 --- a/src/Discord.Net.Core/Entities/Stickers/ICustomSticker.cs +++ b/src/Discord.Net.Core/Entities/Stickers/ICustomSticker.cs @@ -51,7 +51,7 @@ namespace Discord /// Deletes the current sticker. /// /// - /// The bot neeeds the MANAGE_EMOJIS_AND_STICKERS permission inside the guild in order to delete stickers. + /// The bot needs the MANAGE_EMOJIS_AND_STICKERS permission inside the guild in order to delete stickers. /// /// The options to be used when sending the request. /// diff --git a/src/Discord.Net.Core/Extensions/MessageExtensions.cs b/src/Discord.Net.Core/Extensions/MessageExtensions.cs index 3b21c128a..c187ecd5b 100644 --- a/src/Discord.Net.Core/Extensions/MessageExtensions.cs +++ b/src/Discord.Net.Core/Extensions/MessageExtensions.cs @@ -24,7 +24,7 @@ namespace Discord /// Add multiple reactions to a message. /// /// - /// This method does not bulk add reactions! It will send a request for each reaction inculded. + /// This method does not bulk add reactions! It will send a request for each reaction included. /// /// /// @@ -76,7 +76,7 @@ namespace Discord /// /// Sends an inline reply that references a message. /// - /// The message that is being replyed on. + /// The message that is being replied on. /// The message to be sent. /// Determines whether the message should be read aloud by Discord or not. /// The to be sent. diff --git a/src/Discord.Net.Core/Format.cs b/src/Discord.Net.Core/Format.cs index 320c3a5fb..63f9d15a6 100644 --- a/src/Discord.Net.Core/Format.cs +++ b/src/Discord.Net.Core/Format.cs @@ -15,7 +15,7 @@ namespace Discord public static string Italics(string text) => $"*{text}*"; /// Returns a markdown-formatted string with underline formatting. public static string Underline(string text) => $"__{text}__"; - /// Returns a markdown-formatted string with strikethrough formatting. + /// Returns a markdown-formatted string with strike-through formatting. public static string Strikethrough(string text) => $"~~{text}~~"; /// Returns a string with spoiler formatting. public static string Spoiler(string text) => $"||{text}||"; diff --git a/src/Discord.Net.Core/RequestOptions.cs b/src/Discord.Net.Core/RequestOptions.cs index 101925ab2..46aa2681f 100644 --- a/src/Discord.Net.Core/RequestOptions.cs +++ b/src/Discord.Net.Core/RequestOptions.cs @@ -16,10 +16,10 @@ namespace Discord public static RequestOptions Default => new RequestOptions(); /// - /// Gets or sets the maximum time to wait for for this request to complete. + /// Gets or sets the maximum time to wait for this request to complete. /// /// - /// Gets or set the max time, in milliseconds, to wait for for this request to complete. If + /// Gets or set the max time, in milliseconds, to wait for this request to complete. If /// null, a request will not time out. If a rate limit has been triggered for this request's bucket /// and will not be unpaused in time, this request will fail immediately. /// diff --git a/src/Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs b/src/Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs index 5f9d4b5d6..d920e9710 100644 --- a/src/Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs +++ b/src/Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs @@ -108,7 +108,6 @@ namespace Discord.Net.Examples.Core.Entities.Channels using (channel.EnterTypingState()) await LongRunningAsync(); #endregion - } } } diff --git a/src/Discord.Net.Rest/DiscordRestApiClient.cs b/src/Discord.Net.Rest/DiscordRestApiClient.cs index 19fc82fce..7afad6562 100644 --- a/src/Discord.Net.Rest/DiscordRestApiClient.cs +++ b/src/Discord.Net.Rest/DiscordRestApiClient.cs @@ -2227,7 +2227,7 @@ namespace Discord.API Array.Copy(elements, 0, methodArgs, 1, elements.Length); } - int endIndex = format.IndexOf('?'); //Dont include params + int endIndex = format.IndexOf('?'); //Don't include params if (endIndex == -1) endIndex = format.Length; diff --git a/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs index d9b223f18..799d150b5 100644 --- a/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs @@ -10,7 +10,7 @@ using Model = Discord.API.Channel; namespace Discord.Rest { /// - /// Represents a thread channel recieved over REST. + /// Represents a thread channel received over REST. /// public class RestThreadChannel : RestTextChannel, IThreadChannel { @@ -81,7 +81,7 @@ namespace Discord.Rest /// The id of the user to fetch. /// The options to be used when sending the request. /// - /// A task representing the asyncronous get operation. The task returns a + /// A task representing the asynchronous get operation. The task returns a /// if found, otherwise . /// public new Task GetUserAsync(ulong userId, RequestOptions options = null) @@ -92,7 +92,7 @@ namespace Discord.Rest /// /// The options to be used when sending the request. /// - /// A task representing the asyncronous get operation. The task returns a + /// A task representing the asynchronous get operation. The task returns a /// of 's. /// public new async Task> GetUsersAsync(RequestOptions options = null) diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs index 5e56fd56e..7a14fa9df 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs @@ -578,7 +578,7 @@ namespace Discord.Rest /// The options to be used when sending the request. /// /// A task that represents the asynchronous get operation. The task result contains the text channel - /// where guild notices such as welcome messages and boost events are poste; if none is found. + /// where guild notices such as welcome messages and boost events are post; if none is found. /// public async Task GetSystemChannelAsync(RequestOptions options = null) { @@ -611,11 +611,11 @@ namespace Discord.Rest } /// - /// Gets the text channel channel where admins and moderators of Community guilds receive notices from Discord. + /// Gets the text channel where admins and moderators of Community guilds receive notices from Discord. /// /// The options to be used when sending the request. /// - /// A task that represents the asynchronous get operation. The task result contains the text channel channel where + /// A task that represents the asynchronous get operation. The task result contains the text channel where /// admins and moderators of Community guilds receive notices from Discord; if none is set. /// public async Task GetPublicUpdatesChannelAsync(RequestOptions options = null) @@ -914,7 +914,7 @@ namespace Discord.Rest #region Interactions /// - /// Gets this guilds slash commands commands + /// Gets this guilds slash commands /// /// The options to be used when sending the request. /// diff --git a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs index 5dbf78f58..760fc8300 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs @@ -1,7 +1,6 @@ using Discord.API; using Discord.API.Rest; using Discord.Net; -//using Discord.Rest.Entities.Interactions; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Discord.Net.Rest/Entities/Messages/CustomSticker.cs b/src/Discord.Net.Rest/Entities/Messages/CustomSticker.cs index 94caf0f3f..e0d3900fa 100644 --- a/src/Discord.Net.Rest/Entities/Messages/CustomSticker.cs +++ b/src/Discord.Net.Rest/Entities/Messages/CustomSticker.cs @@ -26,7 +26,7 @@ namespace Discord.Rest /// Gets the guild that this custom sticker is in. /// /// - /// Note: This property can be if the sticker wasnt fetched from a guild. + /// Note: This property can be if the sticker wasn't fetched from a guild. /// public RestGuild Guild { get; private set; } diff --git a/src/Discord.Net.Rest/Entities/Messages/RestFollowupMessage.cs b/src/Discord.Net.Rest/Entities/Messages/RestFollowupMessage.cs index 103c856be..f1a03a384 100644 --- a/src/Discord.Net.Rest/Entities/Messages/RestFollowupMessage.cs +++ b/src/Discord.Net.Rest/Entities/Messages/RestFollowupMessage.cs @@ -35,7 +35,7 @@ namespace Discord.Rest } /// - /// Deletes this object and all of it's childern. + /// Deletes this object and all of it's children. /// /// A task that represents the asynchronous delete operation. public Task DeleteAsync() @@ -60,7 +60,7 @@ namespace Discord.Rest /// A task that represents the asynchronous modification operation. /// /// The token used to modify/delete this message expired. - /// /// Somthing went wrong during the request. + /// /// Something went wrong during the request. public new async Task ModifyAsync(Action func, RequestOptions options = null) { try diff --git a/src/Discord.Net.Rest/Entities/Messages/RestInteractionMessage.cs b/src/Discord.Net.Rest/Entities/Messages/RestInteractionMessage.cs index ae1b5f2fb..51fc19483 100644 --- a/src/Discord.Net.Rest/Entities/Messages/RestInteractionMessage.cs +++ b/src/Discord.Net.Rest/Entities/Messages/RestInteractionMessage.cs @@ -31,7 +31,7 @@ namespace Discord.Rest } /// - /// Deletes this object and all of it's childern. + /// Deletes this object and all of it's children. /// /// A task that represents the asynchronous delete operation. public Task DeleteAsync() @@ -56,7 +56,7 @@ namespace Discord.Rest /// A task that represents the asynchronous modification operation. /// /// The token used to modify/delete this message expired. - /// /// Somthing went wrong during the request. + /// /// Something went wrong during the request. public new async Task ModifyAsync(Action func, RequestOptions options = null) { try diff --git a/src/Discord.Net.Rest/Entities/Webhooks/WebhookHelper.cs b/src/Discord.Net.Rest/Entities/Webhooks/WebhookHelper.cs index 50e9cab78..0b61b6c22 100644 --- a/src/Discord.Net.Rest/Entities/Webhooks/WebhookHelper.cs +++ b/src/Discord.Net.Rest/Entities/Webhooks/WebhookHelper.cs @@ -33,6 +33,5 @@ namespace Discord.Rest { await client.ApiClient.DeleteWebhookAsync(webhook.Id, options).ConfigureAwait(false); } - } } diff --git a/src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs b/src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs index 52fea021b..88226914e 100644 --- a/src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs +++ b/src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs @@ -435,7 +435,7 @@ namespace Discord.Net.Queue if (!hasQueuedReset || resetTick > _resetTick) { _resetTick = resetTick; - LastAttemptAt = resetTick.Value; //Make sure we dont destroy this until after its been reset + LastAttemptAt = resetTick.Value; //Make sure we don't destroy this until after its been reset #if DEBUG_LIMITS Debug.WriteLine($"[{id}] Reset in {(int)Math.Ceiling((resetTick - DateTimeOffset.UtcNow).Value.TotalMilliseconds)} ms"); #endif @@ -456,7 +456,7 @@ namespace Discord.Net.Queue lock (_lock) { millis = (int)Math.Ceiling((_resetTick.Value - DateTimeOffset.UtcNow).TotalMilliseconds); - if (millis <= 0) //Make sure we havent gotten a more accurate reset time + if (millis <= 0) //Make sure we haven't gotten a more accurate reset time { #if DEBUG_LIMITS Debug.WriteLine($"[{id}] * Reset *"); diff --git a/src/Discord.Net.WebSocket/API/Voice/ReadyEvent.cs b/src/Discord.Net.WebSocket/API/Voice/ReadyEvent.cs index 10479cdb2..fb910573a 100644 --- a/src/Discord.Net.WebSocket/API/Voice/ReadyEvent.cs +++ b/src/Discord.Net.WebSocket/API/Voice/ReadyEvent.cs @@ -14,7 +14,7 @@ namespace Discord.API.Voice [JsonProperty("modes")] public string[] Modes { get; set; } [JsonProperty("heartbeat_interval")] - [Obsolete("This field is errorneous and should not be used", true)] + [Obsolete("This field is erroneous and should not be used", true)] public int HeartbeatInterval { get; set; } } } diff --git a/src/Discord.Net.WebSocket/Audio/Streams/BufferedWriteStream.cs b/src/Discord.Net.WebSocket/Audio/Streams/BufferedWriteStream.cs index a2de252a2..25afde784 100644 --- a/src/Discord.Net.WebSocket/Audio/Streams/BufferedWriteStream.cs +++ b/src/Discord.Net.WebSocket/Audio/Streams/BufferedWriteStream.cs @@ -125,7 +125,7 @@ namespace Discord.Audio.Streams timestamp += OpusEncoder.FrameSamplesPerChannel; } #if DEBUG - var _ = _logger?.DebugAsync("Buffer underrun"); + var _ = _logger?.DebugAsync("Buffer under run"); #endif } } diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 596611b1a..ba788093d 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -51,7 +51,7 @@ namespace Discord.WebSocket /// Provides access to a REST-only client with a shared state from this client. /// public override DiscordSocketRestClient Rest { get; } - /// Gets the shard of of this client. + /// Gets the shard of this client. public int ShardId { get; } /// Gets the current connection state of this client. public ConnectionState ConnectionState => _connection.State; @@ -438,7 +438,7 @@ namespace Discord.WebSocket var entity = State.GetOrAddCommand(model.Id, (id) => SocketApplicationCommand.Create(this, model)); - //Update it incase it was cached + //Update it in case it was cached entity.Update(model); return entity; @@ -1522,7 +1522,7 @@ namespace Discord.WebSocket } else { - //Edited message isnt in cache, create a detached one + //Edited message isn't in cache, create a detached one SocketUser author; if (data.Author.IsSpecified) { diff --git a/src/Discord.Net.WebSocket/DiscordSocketConfig.cs b/src/Discord.Net.WebSocket/DiscordSocketConfig.cs index e2e4f9897..6946a02b5 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketConfig.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketConfig.cs @@ -79,7 +79,7 @@ namespace Discord.WebSocket /// /// /// By default, the Discord gateway will only send offline members if a guild has less than a certain number - /// of members (determined by in this library). This behaviour is why + /// of members (determined by in this library). This behavior is why /// sometimes a user may be missing from the WebSocket cache for collections such as /// . /// diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs index 1956a9b86..ce529ca89 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs @@ -11,7 +11,7 @@ using StageInstance = Discord.API.StageInstance; namespace Discord.WebSocket { /// - /// Represents a stage channel recieved over the gateway. + /// Represents a stage channel received over the gateway. /// public class SocketStageChannel : SocketVoiceChannel, IStageChannel { diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index ccda12644..4f595539e 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -1551,7 +1551,7 @@ namespace Discord.WebSocket } internal async Task FinishConnectAudio(string url, string token) { - //TODO: Mem Leak: Disconnected/Connected handlers arent cleaned up + //TODO: Mem Leak: Disconnected/Connected handlers aren't cleaned up var voiceState = GetVoiceState(Discord.CurrentUser.Id).Value; await _audioLock.WaitAsync().ConfigureAwait(false); diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Context Menu Commands/Message Commands/SocketMessageCommandData.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Context Menu Commands/Message Commands/SocketMessageCommandData.cs index e78da223d..fc3be82b7 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Context Menu Commands/Message Commands/SocketMessageCommandData.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Context Menu Commands/Message Commands/SocketMessageCommandData.cs @@ -10,7 +10,7 @@ namespace Discord.WebSocket public class SocketMessageCommandData : SocketCommandBaseData { /// - /// Gets the messagte associated with this message command. + /// Gets the message associated with this message command. /// public SocketMessage Message => ResolvableData?.Messages.FirstOrDefault().Value; diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs index 849ce4df8..051a290e6 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs @@ -131,7 +131,7 @@ namespace Discord.WebSocket /// Updates the message which this component resides in with the type /// /// A delegate containing the properties to modify the message with. - /// The request options for this async request. + /// The request options for this request. /// A task that represents the asynchronous operation of updating the message. public async Task UpdateAsync(Action func, RequestOptions options = null) { @@ -330,7 +330,7 @@ namespace Discord.WebSocket /// Defers an interaction and responds with type 5 () /// /// to send this message ephemerally, otherwise . - /// The request options for this async request. + /// The request options for this request. /// /// A task that represents the asynchronous operation of acknowledging the interaction. /// diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteraction.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteraction.cs index 0eb22f29d..9164bfdd6 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteraction.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteraction.cs @@ -75,7 +75,7 @@ namespace Discord.WebSocket /// - [Obsolete("Autocomplete interactions cannot be defered!", true)] + [Obsolete("Autocomplete interactions cannot be deferred!", true)] public override Task DeferAsync(bool ephemeral = false, RequestOptions options = null) => throw new NotSupportedException(); /// diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs index 04550fd43..1f70cfa4b 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs @@ -35,7 +35,7 @@ namespace Discord.WebSocket public ulong Version { get; } /// - /// Gets the current autocomplete option that is activly being filled out. + /// Gets the current autocomplete option that is actively being filled out. /// public AutocompleteOption Current { get; } diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs index b2ea82856..6bd1c69e0 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs @@ -6,7 +6,7 @@ using Model = Discord.API.ApplicationCommandInteractionDataOption; namespace Discord.WebSocket { /// - /// Represents a Websocket-based recieved by the gateway + /// Represents a Websocket-based received by the gateway /// public class SocketSlashCommandDataOption : IApplicationCommandInteractionDataOption { diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs index bd8962540..b4297b4bd 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs @@ -8,7 +8,7 @@ using System.IO; namespace Discord.WebSocket { /// - /// Represents an Interaction recieved over the gateway. + /// Represents an Interaction received over the gateway. /// public abstract class SocketInteraction : SocketEntity, IDiscordInteraction { diff --git a/src/Discord.Net.WebSocket/Entities/Stickers/SocketCustomSticker.cs b/src/Discord.Net.WebSocket/Entities/Stickers/SocketCustomSticker.cs index 9acc20a14..cfe12ebef 100644 --- a/src/Discord.Net.WebSocket/Entities/Stickers/SocketCustomSticker.cs +++ b/src/Discord.Net.WebSocket/Entities/Stickers/SocketCustomSticker.cs @@ -23,7 +23,7 @@ namespace Discord.WebSocket /// /// /// This may return in the WebSocket implementation due to incomplete user collection in - /// large guilds, or the bot doesnt have the MANAGE_EMOJIS_AND_STICKERS permission. + /// large guilds, or the bot doesn't have the MANAGE_EMOJIS_AND_STICKERS permission. /// /// public SocketGuildUser Author diff --git a/test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs b/test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs index 4d0cc8a55..83c6ede19 100644 --- a/test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs +++ b/test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs @@ -171,7 +171,7 @@ namespace Discord } /// - /// Tests that valid urls do not throw any exceptions. + /// Tests that valid url's do not throw any exceptions. /// /// The url to set. [Theory] diff --git a/test/Discord.Net.Tests.Unit/FormatTests.cs b/test/Discord.Net.Tests.Unit/FormatTests.cs index 8cb632b7e..c015c7e15 100644 --- a/test/Discord.Net.Tests.Unit/FormatTests.cs +++ b/test/Discord.Net.Tests.Unit/FormatTests.cs @@ -68,7 +68,7 @@ namespace Discord [InlineData(">>__uwu__", "uwu")] [InlineData("```uwu```", "uwu")] [InlineData("~uwu~", "uwu")] - [InlineData("berries __and__ *Cream**, i'm a little lad who loves berries and cream", "berries and Cream, i'm a little lad who loves berries and cream")] + [InlineData("berries __and__ *Cream**, I'm a little lad who loves berries and cream", "berries and Cream, I'm a little lad who loves berries and cream")] public void StripMarkdown(string input, string expected) { var test = Format.StripMarkDown(input);