Fix typos in comments and documentation (#2608)
* Fix typos in comments and documentations * Fixes more typo
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Discord.Interactions
|
||||
public bool IsRequired { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the input as required or optinal.
|
||||
/// Sets the input as required or optional.
|
||||
/// </summary>
|
||||
/// <param name="isRequired">Whether or not user input is required for this input.</param>
|
||||
public RequiredInputAttribute(bool isRequired = true)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Discord.Interactions.Builders
|
||||
/// <inheritdoc/>
|
||||
public ModuleBuilder Module { get; }
|
||||
|
||||
//// <inheritdoc/>
|
||||
/// <inheritdoc/>
|
||||
public ExecuteCallback Callback { get; internal set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Discord.Interactions.Builders
|
||||
bool IsParameterArray { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the deafult value of this parameter.
|
||||
/// Gets the default value of this parameter.
|
||||
/// </summary>
|
||||
object DefaultValue { get; }
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Discord.Interactions
|
||||
bool IgnoreGroupNames { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets wheter this command supports wild card patterns.
|
||||
/// Gets whether this command supports wild card patterns.
|
||||
/// </summary>
|
||||
bool SupportsWildCards { get; }
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@ namespace Discord.Interactions
|
||||
/// Creates an <see cref="IModal"/> and fills it with provided message components.
|
||||
/// </summary>
|
||||
/// <param name="context">Context of the <see cref="IModalInteraction"/> that will be injected into the modal.</param>
|
||||
/// <param name="services">Services to be passed onto the <see cref="ComponentTypeConverter"/>s of the modal fiels.</param>
|
||||
/// <param name="throwOnMissingField">Wheter or not this method should exit on encountering a missing modal field.</param>
|
||||
/// <param name="services">Services to be passed onto the <see cref="ComponentTypeConverter"/>s of the modal fields.</param>
|
||||
/// <param name="throwOnMissingField">Whether or not this method should exit on encountering a missing modal field.</param>
|
||||
/// <returns>
|
||||
/// A <see cref="TypeConverterResult"/> if a type conversion has failed, else a <see cref="ParseResult"/>.
|
||||
/// </returns>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Discord.Interactions
|
||||
public double? MinValue { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the maxmimum value permitted for a number type parameter.
|
||||
/// Gets the maximum value permitted for a number type parameter.
|
||||
/// </summary>
|
||||
public double? MaxValue { get; }
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Discord.Interactions
|
||||
public TypeConverter TypeConverter { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="IAutocompleteHandler"/> thats linked to this parameter.
|
||||
/// Gets the <see cref="IAutocompleteHandler"/> that's linked to this parameter.
|
||||
/// </summary>
|
||||
public IAutocompleteHandler AutocompleteHandler { get; }
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Discord.Interactions
|
||||
public class InteractionService : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when a Slash Command related information is recieved.
|
||||
/// Occurs when a Slash Command related information is received.
|
||||
/// </summary>
|
||||
public event Func<LogMessage, Task> Log { add { _logEvent.Add(value); } remove { _logEvent.Remove(value); } }
|
||||
internal readonly AsyncEvent<Func<LogMessage, Task>> _logEvent = new();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Discord.Interactions
|
||||
public bool ThrowOnError { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the delimiters that will be used to seperate group names and the method name when a Message Component Interaction is recieved.
|
||||
/// Gets or sets the delimiters that will be used to separate group names and the method name when a Message Component Interaction is received.
|
||||
/// </summary>
|
||||
public char[] InteractionCustomIdDelimiters { get; set; }
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Discord.Interactions
|
||||
public bool EnableAutocompleteHandlers { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether new service scopes should be automatically created when resolving module depedencies on every command execution.
|
||||
/// Gets or sets whether new service scopes should be automatically created when resolving module dependencies on every command execution.
|
||||
/// </summary>
|
||||
public bool AutoServiceScopes { get; set; } = true;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
namespace Discord.Interactions
|
||||
{
|
||||
/// <summary>
|
||||
/// Respresents a localization provider for Discord Application Commands.
|
||||
/// Represents a localization provider for Discord Application Commands.
|
||||
/// </summary>
|
||||
public interface ILocalizationManager
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Discord.Interactions
|
||||
public struct TypeConverterResult : IResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the result of the convertion if the operation was successful.
|
||||
/// Gets the result of the conversion if the operation was successful.
|
||||
/// </summary>
|
||||
public object Value { get; }
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Discord.Interactions
|
||||
/// <summary>
|
||||
/// Returns a <see cref="TypeConverterResult" /> with <see cref="InteractionCommandError.Exception" /> and the <see cref="Exception.Message"/>.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the type convertion to fail.</param>
|
||||
/// <param name="exception">The exception that caused the type conversion to fail.</param>
|
||||
public static TypeConverterResult FromError(Exception exception) =>
|
||||
new TypeConverterResult(null, InteractionCommandError.Exception, exception.Message);
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace Discord.Interactions
|
||||
/// <summary>
|
||||
/// Will be used to read the incoming payload before executing the method body.
|
||||
/// </summary>
|
||||
/// <param name="context">Command exexution context.</param>
|
||||
/// <param name="option">Recieved option payload.</param>
|
||||
/// <param name="context">Command execution context.</param>
|
||||
/// <param name="option">Received option payload.</param>
|
||||
/// <param name="services">Service provider that will be used to initialize the command module.</param>
|
||||
/// <returns>
|
||||
/// The result of the read process.
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Discord.Interactions
|
||||
/// Enum values tagged with this attribute will not be displayed as a parameter choice
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This attributer must be used along with the default <see cref="EnumConverter{T}"/>
|
||||
/// This attribute must be used along with the default <see cref="EnumConverter{T}"/>
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class HideAttribute : Attribute { }
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Discord.Interactions
|
||||
/// <summary>
|
||||
/// Will be used to read the incoming payload before executing the method body.
|
||||
/// </summary>
|
||||
/// <param name="context">Command exexution context.</param>
|
||||
/// <param name="option">Recieved option payload.</param>
|
||||
/// <param name="context">Command execution context.</param>
|
||||
/// <param name="option">Received option payload.</param>
|
||||
/// <param name="services">Service provider that will be used to initialize the command module.</param>
|
||||
/// <returns>The result of the read process.</returns>
|
||||
public abstract Task<TypeConverterResult> ReadAsync(IInteractionContext context, IApplicationCommandInteractionDataOption option, IServiceProvider services);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user