From ec97895c41caa9c820713e899eff5395f1275c44 Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Fri, 31 Aug 2018 11:18:15 +0800 Subject: [PATCH] Fix lots of typos in comments + Geez, I didn't know there were so many. --- Discord.Net.sln.DotSettings | 10 +++++++++- samples/01_basic_ping_bot/Program.cs | 6 +++--- samples/02_commands_framework/Program.cs | 2 +- .../Preconditions/RequireContextAttribute.cs | 2 +- src/Discord.Net.Commands/CommandError.cs | 2 +- src/Discord.Net.Commands/Info/ModuleInfo.cs | 2 +- .../Entities/Channels/IMessageChannel.cs | 6 +++--- .../Entities/Channels/IVoiceChannel.cs | 6 +++--- .../Entities/Channels/ReorderChannelProperties.cs | 2 +- src/Discord.Net.Rest/DiscordRestClient.cs | 2 +- .../Entities/AuditLogs/DataTypes/ChannelInfo.cs | 4 ++-- .../AuditLogs/DataTypes/MessageDeleteAuditLogData.cs | 2 +- .../AuditLogs/DataTypes/RoleCreateAuditLogData.cs | 2 +- .../AuditLogs/DataTypes/RoleDeleteAuditLogData.cs | 2 +- .../AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs | 2 +- .../Entities/Channels/IRestMessageChannel.cs | 6 +++--- src/Discord.Net.Rest/Entities/Users/RestUser.cs | 4 ++-- .../Audio/Streams/OpusEncodeStream.cs | 2 +- .../Audio/Streams/SodiumDecryptStream.cs | 4 +++- .../Audio/Streams/SodiumEncryptStream.cs | 4 +++- src/Discord.Net.WebSocket/BaseSocketClient.Events.cs | 2 +- src/Discord.Net.WebSocket/BaseSocketClient.cs | 2 +- .../Entities/Channels/ISocketMessageChannel.cs | 6 +++--- .../Entities/Channels/SocketTextChannel.cs | 2 +- test/Discord.Net.Tests/Tests.GuildPermissions.cs | 4 ++-- 25 files changed, 50 insertions(+), 38 deletions(-) diff --git a/Discord.Net.sln.DotSettings b/Discord.Net.sln.DotSettings index f02a410c0..b29ba331c 100644 --- a/Discord.Net.sln.DotSettings +++ b/Discord.Net.sln.DotSettings @@ -1,6 +1,14 @@  True True + True True + True + True + True + True + True True - True + True + True + True diff --git a/samples/01_basic_ping_bot/Program.cs b/samples/01_basic_ping_bot/Program.cs index 0fcc52b85..973a6ce95 100644 --- a/samples/01_basic_ping_bot/Program.cs +++ b/samples/01_basic_ping_bot/Program.cs @@ -5,14 +5,14 @@ using Discord.WebSocket; namespace _01_basic_ping_bot { - // This is a minimal, barebones example of using Discord.Net + // This is a minimal, bare-bones example of using Discord.Net // // If writing a bot with commands, we recommend using the Discord.Net.Commands // framework, rather than handling commands yourself, like we do in this sample. // // You can find samples of using the command framework: // - Here, under the 02_commands_framework sample - // - https://github.com/foxbot/DiscordBotBase - a barebones bot template + // - https://github.com/foxbot/DiscordBotBase - a bare-bones bot template // - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library class Program { @@ -54,7 +54,7 @@ namespace _01_basic_ping_bot return Task.CompletedTask; } - // This is not the recommmended way to write a bot - consider + // This is not the recommended way to write a bot - consider // reading over the Commands Framework sample. private async Task MessageReceivedAsync(SocketMessage message) { diff --git a/samples/02_commands_framework/Program.cs b/samples/02_commands_framework/Program.cs index 3fed652d3..136494bdf 100644 --- a/samples/02_commands_framework/Program.cs +++ b/samples/02_commands_framework/Program.cs @@ -15,7 +15,7 @@ namespace _02_commands_framework // // You can find samples of using the command framework: // - Here, under the 02_commands_framework sample - // - https://github.com/foxbot/DiscordBotBase - a barebones bot template + // - https://github.com/foxbot/DiscordBotBase - a bare-bones bot template // - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library class Program { diff --git a/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs b/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs index 641b436ea..3b33552a2 100644 --- a/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs @@ -42,7 +42,7 @@ namespace Discord.Commands /// [RequireContext(ContextType.DM | ContextType.Group)] /// public Task PrivateOnlyAsync() /// { - /// return ReplyAsync("shhh, this command is a secret"); + /// return ReplyAsync("shh, this command is a secret"); /// } /// /// diff --git a/src/Discord.Net.Commands/CommandError.cs b/src/Discord.Net.Commands/CommandError.cs index 40d678137..b487d8a1e 100644 --- a/src/Discord.Net.Commands/CommandError.cs +++ b/src/Discord.Net.Commands/CommandError.cs @@ -26,7 +26,7 @@ namespace Discord.Commands /// ObjectNotFound, /// - /// Thrown when more than one objects is matched by . + /// Thrown when more than one object is matched by . /// MultipleMatches, diff --git a/src/Discord.Net.Commands/Info/ModuleInfo.cs b/src/Discord.Net.Commands/Info/ModuleInfo.cs index bd75c143c..7b9959efe 100644 --- a/src/Discord.Net.Commands/Info/ModuleInfo.cs +++ b/src/Discord.Net.Commands/Info/ModuleInfo.cs @@ -49,7 +49,7 @@ namespace Discord.Commands /// public IReadOnlyList Attributes { get; } /// - /// Gets a read-only list of submodules associated with tihs module. + /// Gets a read-only list of submodules associated with this module. /// public IReadOnlyList Submodules { get; } /// diff --git a/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs b/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs index 50b6a4d66..146677e27 100644 --- a/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs @@ -18,7 +18,7 @@ namespace Discord /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -39,7 +39,7 @@ namespace Discord /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -61,7 +61,7 @@ namespace Discord /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// Task SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); diff --git a/src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs b/src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs index b222ca004..9c2d008ee 100644 --- a/src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs @@ -9,10 +9,10 @@ namespace Discord public interface IVoiceChannel : INestedChannel, IAudioChannel { /// - /// Gets the bitrate that the clients in this voice channel are requested to use. + /// Gets the bit-rate that the clients in this voice channel are requested to use. /// /// - /// An representing the bitrate (bps) that this voice channel defines and requests the + /// An representing the bit-rate (bps) that this voice channel defines and requests the /// client(s) to use. /// int Bitrate { get; } @@ -20,7 +20,7 @@ namespace Discord /// Gets the max number of users allowed to be connected to this channel at once. /// /// - /// An representing the maxmimum number of users that are allowed to be connected to this + /// An representing the maximum number of users that are allowed to be connected to this /// channel at once; null if a limit is not set. /// int? UserLimit { get; } diff --git a/src/Discord.Net.Core/Entities/Channels/ReorderChannelProperties.cs b/src/Discord.Net.Core/Entities/Channels/ReorderChannelProperties.cs index 903a2a047..ffd90dae6 100644 --- a/src/Discord.Net.Core/Entities/Channels/ReorderChannelProperties.cs +++ b/src/Discord.Net.Core/Entities/Channels/ReorderChannelProperties.cs @@ -9,7 +9,7 @@ namespace Discord /// Gets the ID of the channel to apply this position to. /// /// - /// A representing the snowflake identififer of this channel. + /// A representing the snowflake identifier of this channel. /// public ulong Id { get; } /// diff --git a/src/Discord.Net.Rest/DiscordRestClient.cs b/src/Discord.Net.Rest/DiscordRestClient.cs index 97eb3a352..e36353855 100644 --- a/src/Discord.Net.Rest/DiscordRestClient.cs +++ b/src/Discord.Net.Rest/DiscordRestClient.cs @@ -20,7 +20,7 @@ namespace Discord.Rest /// public DiscordRestClient() : this(new DiscordRestConfig()) { } /// - /// Initializes a new with the provided configuratation. + /// Initializes a new with the provided configuration. /// /// The configuration to be used with the client. public DiscordRestClient(DiscordRestConfig config) : base(config, CreateApiClient(config)) { } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs index 82b129656..6382e8250 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs @@ -28,10 +28,10 @@ namespace Discord.Rest /// public string Topic { get; } /// - /// Gets the bitrate of this channel if applicable. + /// Gets the bit-rate of this channel if applicable. /// /// - /// An representing the bitrate set for the voice channel; null if not + /// An representing the bit-rate set for the voice channel; null if not /// applicable. /// public int? Bitrate { get; } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs index b12f990c8..317d47648 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs @@ -30,7 +30,7 @@ namespace Discord.Rest /// Gets the ID of the channel that the messages were deleted from. /// /// - /// A representing the snowflake identifer for the channel that the messages were + /// A representing the snowflake identifier for the channel that the messages were /// deleted from. /// public ulong ChannelId { get; } diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs index be59cdea0..cee255fb0 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs @@ -48,7 +48,7 @@ namespace Discord.Rest /// Gets the ID of the role that was created. /// /// - /// A representing the snowflake identifer to the role that was created. + /// A representing the snowflake identifier to the role that was created. /// public ulong RoleId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs index ae397840f..78b5efc87 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs @@ -48,7 +48,7 @@ namespace Discord.Rest /// Gets the ID of the role that was deleted. /// /// - /// A representing the snowflake identifer to the role that was deleted. + /// A representing the snowflake identifier to the role that was deleted. /// public ulong RoleId { get; } /// diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs index aa2644ed8..18fe865df 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs @@ -45,7 +45,7 @@ namespace Discord.Rest /// Gets the webhook that was updated. /// /// - /// A webhook objet representing the webhook that was updated. + /// A webhook object representing the webhook that was updated. /// public IWebhook Webhook { get; } diff --git a/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs b/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs index c4a6f8536..30e4ddf2c 100644 --- a/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs @@ -17,7 +17,7 @@ namespace Discord.Rest /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -38,7 +38,7 @@ namespace Discord.Rest /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -60,7 +60,7 @@ namespace Discord.Rest /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); diff --git a/src/Discord.Net.Rest/Entities/Users/RestUser.cs b/src/Discord.Net.Rest/Entities/Users/RestUser.cs index 97310312e..6af5b5c95 100644 --- a/src/Discord.Net.Rest/Entities/Users/RestUser.cs +++ b/src/Discord.Net.Rest/Entities/Users/RestUser.cs @@ -87,10 +87,10 @@ namespace Discord.Rest => CDN.GetDefaultUserAvatarUrl(DiscriminatorValue); /// - /// Gets the Username#Descriminator of the user. + /// Gets the Username#Discriminator of the user. /// /// - /// A string that resolves to Username#Descriminator of the user. + /// A string that resolves to Username#Discriminator of the user. /// public override string ToString() => $"{Username}#{Discriminator}"; private string DebuggerDisplay => $"{Username}#{Discriminator} ({Id}{(IsBot ? ", Bot" : "")})"; diff --git a/src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs b/src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs index f5883ad4b..035b92b30 100644 --- a/src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs +++ b/src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs @@ -25,7 +25,7 @@ namespace Discord.Audio.Streams public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancelToken) { - //Assume threadsafe + //Assume thread-safe while (count > 0) { if (_partialFramePos == 0 && count >= OpusConverter.FrameBytes) diff --git a/src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs b/src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs index 9ed849a5e..2b1a97f04 100644 --- a/src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs +++ b/src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs @@ -4,7 +4,9 @@ using System.Threading.Tasks; namespace Discord.Audio.Streams { - /// Decrypts an RTP frame using libsodium + /// + /// Decrypts an RTP frame using libsodium. + /// public class SodiumDecryptStream : AudioOutStream { private readonly AudioClient _client; diff --git a/src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs b/src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs index 2b5cc0a18..8b3f0e302 100644 --- a/src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs +++ b/src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs @@ -4,7 +4,9 @@ using System.Threading.Tasks; namespace Discord.Audio.Streams { - /// Encrypts an RTP frame using libsodium + /// + /// Encrypts an RTP frame using libsodium. + /// public class SodiumEncryptStream : AudioOutStream { private readonly AudioClient _client; diff --git a/src/Discord.Net.WebSocket/BaseSocketClient.Events.cs b/src/Discord.Net.WebSocket/BaseSocketClient.Events.cs index db4eb9c94..b1b7d17b5 100644 --- a/src/Discord.Net.WebSocket/BaseSocketClient.Events.cs +++ b/src/Discord.Net.WebSocket/BaseSocketClient.Events.cs @@ -71,7 +71,7 @@ namespace Discord.WebSocket /// The message that is sent to the client is passed into the event handler parameter as /// . This message may be a system message (i.e. /// ) or a user message (i.e. . See the - /// derived clsases of for more details. + /// derived classes of for more details. /// /// public event Func MessageReceived { diff --git a/src/Discord.Net.WebSocket/BaseSocketClient.cs b/src/Discord.Net.WebSocket/BaseSocketClient.cs index 22a26ba12..abaf5989e 100644 --- a/src/Discord.Net.WebSocket/BaseSocketClient.cs +++ b/src/Discord.Net.WebSocket/BaseSocketClient.cs @@ -194,7 +194,7 @@ namespace Discord.WebSocket /// clients only. /// /// - /// The activty to be set. + /// The activity to be set. /// /// A task that represents the asynchronous set operation. /// diff --git a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs index 42ac984c4..9f04239ad 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs @@ -26,7 +26,7 @@ namespace Discord.WebSocket /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -47,7 +47,7 @@ namespace Discord.WebSocket /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); @@ -69,7 +69,7 @@ namespace Discord.WebSocket /// The to be sent. /// The options to be used when sending the request. /// - /// A task that represents an asynchronous send operation for delievering the message. The task result + /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs index 52cc02d50..bf87c48a8 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs @@ -79,7 +79,7 @@ namespace Discord.WebSocket /// The snowflake identifier of the message. /// The options to be used when sending the request. /// - /// A task that represents an asynchrnous get operation for retrieving the message. The task result contains + /// A task that represents an asynchronous get operation for retrieving the message. The task result contains /// the retrieved message; null if no message is found with the specified identifier. /// public async Task GetMessageAsync(ulong id, RequestOptions options = null) diff --git a/test/Discord.Net.Tests/Tests.GuildPermissions.cs b/test/Discord.Net.Tests/Tests.GuildPermissions.cs index bbd6621b5..f49f431b5 100644 --- a/test/Discord.Net.Tests/Tests.GuildPermissions.cs +++ b/test/Discord.Net.Tests/Tests.GuildPermissions.cs @@ -31,11 +31,11 @@ namespace Discord copy = GuildPermissions.None.Modify(); Assert.Equal(GuildPermissions.None.RawValue, copy.RawValue); - // test modify with no paramters on all permissions + // test modify with no parameters on all permissions copy = GuildPermissions.All.Modify(); Assert.Equal(GuildPermissions.All.RawValue, copy.RawValue); - // test modify with no paramters on webhook permissions + // test modify with no parameters on webhook permissions copy = GuildPermissions.Webhook.Modify(); Assert.Equal(GuildPermissions.Webhook.RawValue, copy.RawValue);