Fix typos in comments and documentation (#2608)

* Fix typos in comments and documentations

* Fixes more typo
This commit is contained in:
Ge
2023-02-27 03:49:16 +08:00
committed by GitHub
parent 709364aaef
commit ee617d8ef3
56 changed files with 137 additions and 138 deletions

View File

@@ -11,14 +11,14 @@ namespace Discord.Interactions
public static class InteractionUtility
{
/// <summary>
/// Wait for an Interaction event for a given amount of time as an asynchronous opration.
/// Wait for an Interaction event for a given amount of time as an asynchronous operation.
/// </summary>
/// <param name="client">Client that should be listened to for the <see cref="BaseSocketClient.InteractionCreated"/> event.</param>
/// <param name="timeout">Timeout duration for this operation.</param>
/// <param name="predicate">Delegate for cheking whether an Interaction meets the requirements.</param>
/// <param name="predicate">Delegate for checking whether an Interaction meets the requirements.</param>
/// <param name="cancellationToken">Token for canceling the wait operation.</param>
/// <returns>
/// A Task representing the asyncronous waiting operation. If the user responded in the given amount of time, Task result contains the user response,
/// A Task representing the asynchronous waiting operation. If the user responded in the given amount of time, Task result contains the user response,
/// otherwise the Task result is <see langword="null"/>.
/// </returns>
public static async Task<SocketInteraction> WaitForInteractionAsync(BaseSocketClient client, TimeSpan timeout,
@@ -55,14 +55,14 @@ namespace Discord.Interactions
}
/// <summary>
/// Wait for an Message Component Interaction event for a given amount of time as an asynchronous opration .
/// Wait for an Message Component Interaction event for a given amount of time as an asynchronous operation .
/// </summary>
/// <param name="client">Client that should be listened to for the <see cref="BaseSocketClient.InteractionCreated"/> event.</param>
/// <param name="fromMessage">The message that <see cref="BaseSocketClient.ButtonExecuted"/> or <see cref="BaseSocketClient.SelectMenuExecuted"/> should originate from.</param>
/// <param name="timeout">Timeout duration for this operation.</param>
/// <param name="cancellationToken">Token for canceling the wait operation.</param>
/// <returns>
/// A Task representing the asyncronous waiting operation with a <see cref="IDiscordInteraction"/> result,
/// A Task representing the asynchronous waiting operation with a <see cref="IDiscordInteraction"/> result,
/// the result is null if the process timed out before receiving a valid Interaction.
/// </returns>
public static Task<SocketInteraction> WaitForMessageComponentAsync(BaseSocketClient client, IUserMessage fromMessage, TimeSpan timeout,
@@ -83,7 +83,7 @@ namespace Discord.Interactions
/// <param name="message">Optional custom prompt message.</param>
/// <param name="cancellationToken">Token for canceling the wait operation.</param>
/// <returns>
/// A Task representing the asyncronous waiting operation with a <see cref="bool"/> result,
/// A Task representing the asynchronous waiting operation with a <see cref="bool"/> result,
/// the result is <see langword="false"/> if the user declined the prompt or didnt answer in time, <see langword="true"/> if the user confirmed the prompt.
/// </returns>
public static async Task<bool> ConfirmAsync(BaseSocketClient client, IMessageChannel channel, TimeSpan timeout, string message = null,

View File

@@ -8,19 +8,19 @@ namespace System.Text.RegularExpressions
internal static class RegexUtils
{
internal const byte Q = 5; // quantifier
internal const byte S = 4; // ordinary stoppper
internal const byte S = 4; // ordinary stopper
internal const byte Z = 3; // ScanBlank stopper
internal const byte X = 2; // whitespace
internal const byte E = 1; // should be escaped
internal static readonly byte[] _category = new byte[] {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F
0,0,0,0,0,0,0,0,0,X,X,0,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
// ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
// ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
X,0,0,Z,S,0,0,0,S,S,Q,Q,0,0,S,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q,
// @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,S,S,0,S,0,
// ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
// ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q,S,0,0,0};
internal static string EscapeExcluding(string input, params char[] exclude)