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

@@ -589,7 +589,7 @@ namespace Discord.Commands
var executeResult = await matchResult.Match.Value.ExecuteAsync(context, parseResult, services);
if (!executeResult.IsSuccess && !(executeResult is RuntimeResult || executeResult is ExecuteResult)) // succesful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deffered execution)
if (!executeResult.IsSuccess && !(executeResult is RuntimeResult || executeResult is ExecuteResult)) // successful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deferred execution)
await _commandExecutedEvent.InvokeAsync(matchResult.Match.Value.Command, context, executeResult);
return executeResult;
}

View File

@@ -17,19 +17,19 @@ namespace Discord.Commands
/// <summary>
/// Executed asynchronously before a command is run in this module base.
/// </summary>
/// <param name="command">The command thats about to run.</param>
/// <param name="command">The command that's about to run.</param>
Task BeforeExecuteAsync(CommandInfo command);
/// <summary>
/// Executed before a command is run in this module base.
/// </summary>
/// <param name="command">The command thats about to run.</param>
/// <param name="command">The command that's about to run.</param>
void BeforeExecute(CommandInfo command);
/// <summary>
/// Executed asynchronously after a command is run in this module base.
/// </summary>
/// <param name="command">The command thats about to run.</param>
/// <param name="command">The command that's about to run.</param>
Task AfterExecuteAsync(CommandInfo command);
/// <summary>

View File

@@ -9,12 +9,12 @@ namespace Discord
/// </summary>
public class DiscordConfig
{
/// <summary>
/// Returns the API version Discord.Net uses.
/// <summary>
/// Returns the API version Discord.Net uses.
/// </summary>
/// <returns>
/// An <see cref="int"/> representing the API version that Discord.Net uses to communicate with Discord.
/// <para>A list of available API version can be seen on the official
/// <para>A list of available API version can be seen on the official
/// <see href="https://discord.com/developers/docs/reference#api-versioning">Discord API documentation</see>
/// .</para>
/// </returns>
@@ -53,14 +53,14 @@ namespace Discord
/// The Discord API URL using <see cref="APIVersion"/>.
/// </returns>
public static readonly string APIUrl = $"https://discord.com/api/v{APIVersion}/";
/// <summary>
/// Returns the base Discord CDN URL.
/// <summary>
/// Returns the base Discord CDN URL.
/// </summary>
/// <returns>
/// The base Discord Content Delivery Network (CDN) URL.
/// </returns>
public const string CDNUrl = "https://cdn.discordapp.com/";
/// <summary>
/// <summary>
/// Returns the base Discord invite URL.
/// </summary>
/// <returns>
@@ -68,28 +68,28 @@ namespace Discord
/// </returns>
public const string InviteUrl = "https://discord.gg/";
/// <summary>
/// Returns the default timeout for requests.
/// <summary>
/// Returns the default timeout for requests.
/// </summary>
/// <returns>
/// The amount of time it takes in milliseconds before a request is timed out.
/// </returns>
public const int DefaultRequestTimeout = 15000;
/// <summary>
/// Returns the max length for a Discord message.
/// <summary>
/// Returns the max length for a Discord message.
/// </summary>
/// <returns>
/// The maximum length of a message allowed by Discord.
/// </returns>
public const int MaxMessageSize = 2000;
/// <summary>
/// Returns the max messages allowed to be in a request.
/// <summary>
/// Returns the max messages allowed to be in a request.
/// </summary>
/// <returns>
/// The maximum number of messages that can be gotten per-batch.
/// </returns>
public const int MaxMessagesPerBatch = 100;
/// <summary>
/// <summary>
/// Returns the max users allowed to be in a request.
/// </summary>
/// <returns>
@@ -110,8 +110,8 @@ namespace Discord
/// The maximum number of users that can be gotten per-batch.
/// </returns>
public const int MaxGuildEventUsersPerBatch = 100;
/// <summary>
/// Returns the max guilds allowed to be in a request.
/// <summary>
/// Returns the max guilds allowed to be in a request.
/// </summary>
/// <returns>
/// The maximum number of guilds that can be gotten per-batch.
@@ -124,8 +124,8 @@ namespace Discord
/// The maximum number of user reactions that can be gotten per-batch.
/// </returns>
public const int MaxUserReactionsPerBatch = 100;
/// <summary>
/// Returns the max audit log entries allowed to be in a request.
/// <summary>
/// Returns the max audit log entries allowed to be in a request.
/// </summary>
/// <returns>
/// The maximum number of audit log entries that can be gotten per-batch.
@@ -194,7 +194,7 @@ namespace Discord
public bool UseSystemClock { get; set; } = true;
/// <summary>
/// Gets or sets whether or not the internal experation check uses the system date
/// Gets or sets whether or not the internal expiration check uses the system date
/// + snowflake date to check if an interaction can be responded to.
/// </summary>
/// <remarks>
@@ -215,8 +215,8 @@ namespace Discord
/// </remarks>
public bool FormatUsersInBidirectionalUnicode { get; set; } = true;
/// <summary>
/// Returns the max thread members allowed to be in a request.
/// <summary>
/// Returns the max thread members allowed to be in a request.
/// </summary>
/// <returns>
/// The maximum number of thread members that can be gotten per-batch.

View File

@@ -5,7 +5,7 @@ namespace Discord
/// <summary> No messages will be scanned. </summary>
Disabled = 0,
/// <summary> Scans messages from all guild members that do not have a role. </summary>
/// <remarks> Recommented option for servers that use roles for trusted membership. </remarks>
/// <remarks> Recommended option for servers that use roles for trusted membership. </remarks>
MembersWithoutRoles = 1,
/// <summary> Scan messages sent by all guild members. </summary>
AllMembers = 2

View File

@@ -35,7 +35,7 @@ namespace Discord
/// Gets the description of the event.
/// </summary>
/// <remarks>
/// This field is <see langword="null"/> when the event doesn't have a discription.
/// This field is <see langword="null"/> when the event doesn't have a description.
/// </remarks>
string Description { get; }
@@ -71,7 +71,7 @@ namespace Discord
/// <summary>
/// Gets the optional entity id of the event. The "entity" of the event
/// can be a stage instance event as is seperate from <see cref="ChannelId"/>.
/// can be a stage instance event as is separate from <see cref="ChannelId"/>.
/// </summary>
ulong? EntityId { get; }
@@ -102,7 +102,7 @@ namespace Discord
/// </returns>
Task StartAsync(RequestOptions options = null);
/// <summary>
/// Ends or canceles the event.
/// Ends or cancels the event.
/// </summary>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
@@ -134,7 +134,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// <note type="important">
/// The returned collection is an asynchronous enumerable object; one must call
/// The returned collection is an asynchronous enumerable object; one must call
/// <see cref="AsyncEnumerableExtensions.FlattenAsync{T}"/> to access the individual messages as a
/// collection.
/// </note>
@@ -155,7 +155,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// <note type="important">
/// The returned collection is an asynchronous enumerable object; one must call
/// The returned collection is an asynchronous enumerable object; one must call
/// <see cref="AsyncEnumerableExtensions.FlattenAsync{T}"/> to access the individual users as a
/// collection.
/// </note>
@@ -165,7 +165,7 @@ namespace Discord
/// </note>
/// This method will attempt to fetch the number of users specified under <paramref name="limit"/> around
/// the user <paramref name="fromUserId"/> depending on the <paramref name="dir"/>. The library will
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// <see cref="DiscordConfig.MaxGuildEventUsersPerBatch"/>. In other words, should the user request 500 users,
/// and the <see cref="Discord.DiscordConfig.MaxGuildEventUsersPerBatch"/> constant is <c>100</c>, the request will
/// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need

View File

@@ -1,7 +1,7 @@
namespace Discord
{
/// <summary>
/// Respresents a <see cref="IMessageComponent"/> text input.
/// Represents a <see cref="IMessageComponent"/> text input.
/// </summary>
public class TextInputComponent : IMessageComponent
{
@@ -17,7 +17,7 @@ namespace Discord
public string Label { get; }
/// <summary>
/// Gets the placeholder of the component.
/// Gets the placeholder of the component.
/// </summary>
public string Placeholder { get; }

View File

@@ -10,7 +10,7 @@ namespace Discord
internal override ApplicationCommandType Type => ApplicationCommandType.Slash;
/// <summary>
/// Gets or sets the discription of this command.
/// Gets or sets the description of this command.
/// </summary>
public Optional<string> Description { get; set; }

View File

@@ -161,11 +161,11 @@ namespace Discord
}
/// <summary>
/// Tries to parse a string into an <see cref="EmbedBuilder"/>.
/// Tries to parse a string into an <see cref="EmbedBuilder"/>.
/// </summary>
/// <param name="json">The json string to parse.</param>
/// <param name="builder">The <see cref="EmbedBuilder"/> with populated values. An empty instance if method returns <see langword="false"/>.</param>
/// <returns><see langword="true"/> if <paramref name="json"/> was succesfully parsed. <see langword="false"/> if not.</returns>
/// <returns><see langword="true"/> if <paramref name="json"/> was successfully parsed. <see langword="false"/> if not.</returns>
public static bool TryParse(string json, out EmbedBuilder builder)
{
builder = new EmbedBuilder();

View File

@@ -99,7 +99,7 @@ namespace Discord
/// <param name="guildId">Id of the target guild.</param>
/// <param name="allow">The value of this permission.</param>
/// <returns>
/// Instance of <see cref="ApplicationCommandPermission"/> targeting everychannel in a guild.
/// Instance of <see cref="ApplicationCommandPermission"/> targeting every channel in a guild.
/// </returns>
public static ApplicationCommandPermission ForAllChannels(ulong guildId, bool allow) =>
new(guildId - 1, ApplicationCommandPermissionTarget.Channel, allow);
@@ -110,7 +110,7 @@ namespace Discord
/// <param name="guild">Target guild.</param>
/// <param name="allow">The value of this permission.</param>
/// <returns>
/// Instance of <see cref="ApplicationCommandPermission"/> targeting everychannel in a guild.
/// Instance of <see cref="ApplicationCommandPermission"/> targeting every channel in a guild.
/// </returns>
public static ApplicationCommandPermission ForAllChannels(IGuild guild, bool allow) =>
ForAllChannels(guild.Id, allow);

View File

@@ -33,7 +33,7 @@ namespace Discord
/// </returns>
bool? IsRevoked { get; }
/// <summary>
/// Gets a <see cref="IReadOnlyCollection{T}"/> of integration parials.
/// Gets a <see cref="IReadOnlyCollection{T}"/> of integration partials.
/// </summary>
IReadOnlyCollection<IIntegration> Integrations { get; }
/// <summary>

View File

@@ -111,7 +111,7 @@ namespace Discord
/// Formats a user's username + discriminator.
/// </summary>
/// <param name="doBidirectional">To format the string in bidirectional unicode or not</param>
/// <param name="user">The user whos username and discriminator to format</param>
/// <param name="user">The user whose username and discriminator to format</param>
/// <returns>The username + discriminator</returns>
public static string UsernameAndDiscriminator(IUser user, bool doBidirectional)
{

View File

@@ -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)

View File

@@ -23,7 +23,7 @@ namespace Discord.Interactions.Builders
/// <inheritdoc/>
public ModuleBuilder Module { get; }
//// <inheritdoc/>
/// <inheritdoc/>
public ExecuteCallback Callback { get; internal set; }
/// <inheritdoc/>

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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>

View File

@@ -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; }

View File

@@ -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();

View File

@@ -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;

View File

@@ -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
{

View File

@@ -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);

View File

@@ -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.

View File

@@ -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 { }

View File

@@ -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);

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)

View File

@@ -2328,7 +2328,7 @@ namespace Discord.API
.Append(args.ActionType.Value);
}
// Still use string interp for the query w/o params, as this is necessary for CreateBucketId
// Still use string interpolation for the query w/o params, as this is necessary for CreateBucketId
endpoint = () => $"guilds/{guildId}/audit-logs?limit={limit}{queryArgs.ToString()}";
return await SendAsync<AuditLog>("GET", endpoint, ids, options: options).ConfigureAwait(false);
}

View File

@@ -7,7 +7,7 @@ using Model = Discord.API.AuditLog;
namespace Discord.Rest
{
/// <summary>
/// Contains a piece of audit log data related to a scheduled event deleteion.
/// Contains a piece of audit log data related to a scheduled event deletion.
/// </summary>
public class ScheduledEventDeleteAuditLogData : IAuditLogData
{

View File

@@ -35,7 +35,7 @@ namespace Discord.Rest
public RestUser User { get; }
/// <summary>
/// Gets the <see cref="RestInteraction"/> the command was recieved with.
/// Gets the <see cref="RestInteraction"/> the command was received with.
/// </summary>
public TInteraction Interaction { get; }
@@ -51,7 +51,7 @@ namespace Discord.Rest
public IReadOnlyCollection<IRouteSegmentMatch> SegmentMatches { get; private set; }
/// <summary>
/// Initializes a new <see cref="RestInteractionContext{TInteraction}"/>.
/// Initializes a new <see cref="RestInteractionContext{TInteraction}"/>.
/// </summary>
/// <param name="client">The underlying client.</param>
/// <param name="interaction">The underlying interaction.</param>
@@ -65,7 +65,7 @@ namespace Discord.Rest
}
/// <summary>
/// Initializes a new <see cref="RestInteractionContext{TInteraction}"/>.
/// Initializes a new <see cref="RestInteractionContext{TInteraction}"/>.
/// </summary>
/// <param name="client">The underlying client.</param>
/// <param name="interaction">The underlying interaction.</param>
@@ -83,7 +83,7 @@ namespace Discord.Rest
/// <inheritdoc/>
IEnumerable<IRouteSegmentMatch> IRouteMatchContainer.SegmentMatches => SegmentMatches;
// IInterationContext
// IInteractionContext
/// <inheritdoc/>
IDiscordClient IInteractionContext.Client => Client;

View File

@@ -9,10 +9,10 @@ namespace Discord.Net.ED25519
{
/// <summary>
/// Comparison of two arrays.
///
///
/// The runtime of this method does not depend on the contents of the arrays. Using constant time
/// prevents timing attacks that allow an attacker to learn if the arrays have a common prefix.
///
///
/// It is important to use such a constant time comparison when verifying MACs.
/// </summary>
/// <param name="x">Byte array</param>
@@ -27,10 +27,10 @@ namespace Discord.Net.ED25519
/// <summary>
/// Comparison of two array segments.
///
///
/// The runtime of this method does not depend on the contents of the arrays. Using constant time
/// prevents timing attacks that allow an attacker to learn if the arrays have a common prefix.
///
///
/// It is important to use such a constant time comparison when verifying MACs.
/// </summary>
/// <param name="x">Byte array segment</param>
@@ -45,17 +45,17 @@ namespace Discord.Net.ED25519
/// <summary>
/// Comparison of two byte sequences.
///
///
/// The runtime of this method does not depend on the contents of the arrays. Using constant time
/// prevents timing attacks that allow an attacker to learn if the arrays have a common prefix.
///
///
/// It is important to use such a constant time comparison when verifying MACs.
/// </summary>
/// <param name="x">Byte array</param>
/// <param name="xOffset">Offset of byte sequence in the x array</param>
/// <param name="y">Byte array</param>
/// <param name="yOffset">Offset of byte sequence in the y array</param>
/// <param name="length">Lengh of byte sequence</param>
/// <param name="length">Length of byte sequence</param>
/// <returns>True if sequences are equal</returns>
public static bool ConstantTimeEquals(byte[] x, int xOffset, byte[] y, int yOffset, int length)
{
@@ -71,7 +71,7 @@ namespace Discord.Net.ED25519
}
/// <summary>
/// Overwrites the contents of the array, wiping the previous content.
/// Overwrites the contents of the array, wiping the previous content.
/// </summary>
/// <param name="data">Byte array</param>
public static void Wipe(byte[] data)
@@ -80,7 +80,7 @@ namespace Discord.Net.ED25519
}
/// <summary>
/// Overwrites the contents of the array, wiping the previous content.
/// Overwrites the contents of the array, wiping the previous content.
/// </summary>
/// <param name="data">Byte array</param>
/// <param name="offset">Index of byte sequence</param>
@@ -91,7 +91,7 @@ namespace Discord.Net.ED25519
}
/// <summary>
/// Overwrites the contents of the array segment, wiping the previous content.
/// Overwrites the contents of the array segment, wiping the previous content.
/// </summary>
/// <param name="data">Byte array segment</param>
public static void Wipe(ArraySegment<byte> data)
@@ -183,7 +183,7 @@ namespace Discord.Net.ED25519
}
/// <summary>
/// Encodes the bytes with the Base64 encoding.
/// Encodes the bytes with the Base64 encoding.
/// More compact than hex, but it is case-sensitive and uses the special characters `+`, `/` and `=`.
/// </summary>
/// <param name="data">Byte array</param>
@@ -247,7 +247,7 @@ namespace Discord.Net.ED25519
/// <returns>Byte array</returns>
public static byte[] Base58Decode(string input)
{
// Decode Base58 string to BigInteger
// Decode Base58 string to BigInteger
BigInteger intData = 0;
for (int i = 0; i < input.Length; i++)
{

View File

@@ -2382,7 +2382,7 @@ namespace Discord.WebSocket
channel = CreateDMChannel(data.ChannelId.Value, user, State);
}
// The channel isnt required when responding to an interaction, so we can leave the channel null.
// The channel isn't required when responding to an interaction, so we can leave the channel null.
}
}
else if (data.User.IsSpecified)

View File

@@ -59,7 +59,7 @@ namespace Discord.WebSocket
/// Gets or sets whether or not the client should download the default stickers on startup.
/// </summary>
/// <remarks>
/// When this is set to <see langword="false"/> default stickers arn't present and cannot be resolved by the client.
/// When this is set to <see langword="false"/> default stickers aren't present and cannot be resolved by the client.
/// This will make all default stickers have the type of <see cref="SocketUnknownSticker"/>.
/// </remarks>
public bool AlwaysDownloadDefaultStickers { get; set; } = false;

View File

@@ -202,7 +202,7 @@ namespace Discord.WebSocket
/// <returns>A task representing the download operation.</returns>
public async Task<IReadOnlyCollection<SocketThreadUser>> GetUsersAsync(RequestOptions options = null)
{
// download all users if we havent
// download all users if we haven't
if (!_usersDownloaded)
{
await DownloadUsersAsync(options);

View File

@@ -1212,7 +1212,7 @@ namespace Discord.WebSocket
/// Gets a collection of all users in this guild.
/// </summary>
/// <remarks>
/// <para>This method retrieves all users found within this guild throught REST.</para>
/// <para>This method retrieves all users found within this guild through REST.</para>
/// <para>Users returned by this method are not cached.</para>
/// </remarks>
/// <param name="options">The options to be used when sending the request.</param>
@@ -2128,7 +2128,7 @@ namespace Discord.WebSocket
_audioLock?.Dispose();
_audioClient?.Dispose();
}
/// <inheritdoc/>
async Task<IAutoModRule> IGuild.GetAutoModRuleAsync(ulong ruleId, RequestOptions options)
=> await GetAutoModRuleAsync(ruleId, options).ConfigureAwait(false);

View File

@@ -401,7 +401,7 @@ namespace Discord.WebSocket
#endregion
/// <summary>
/// Attepts to get the channel this interaction was executed in.
/// Attempts to get the channel this interaction was executed in.
/// </summary>
/// <param name="options">The request options for this <see langword="async"/> request.</param>
/// <returns>

View File

@@ -34,7 +34,7 @@ namespace Discord.Interactions
public SocketUser User { get; }
/// <summary>
/// Gets the <see cref="SocketInteraction"/> the command was recieved with.
/// Gets the <see cref="SocketInteraction"/> the command was received with.
/// </summary>
public TInteraction Interaction { get; }
@@ -42,7 +42,7 @@ namespace Discord.Interactions
public IReadOnlyCollection<IRouteSegmentMatch> SegmentMatches { get; private set; }
/// <summary>
/// Initializes a new <see cref="SocketInteractionContext{TInteraction}"/>.
/// Initializes a new <see cref="SocketInteractionContext{TInteraction}"/>.
/// </summary>
/// <param name="client">The underlying client.</param>
/// <param name="interaction">The underlying interaction.</param>
@@ -85,7 +85,7 @@ namespace Discord.Interactions
public class SocketInteractionContext : SocketInteractionContext<SocketInteraction>
{
/// <summary>
/// Initializes a new <see cref="SocketInteractionContext"/>
/// Initializes a new <see cref="SocketInteractionContext"/>
/// </summary>
/// <param name="client">The underlying client</param>
/// <param name="interaction">The underlying interaction</param>