Fix typos in comments and documentation (#2608)
* Fix typos in comments and documentations * Fixes more typo
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Ratelimits
|
||||
|
||||
Ratelimits are a core concept of any API - Discords API is no exception. each verified library must follow the ratelimit guidelines.
|
||||
Ratelimits are a core concept of any API - Discords API is no exception. Each verified library must follow the ratelimit guidelines.
|
||||
|
||||
### Using the ratelimit callback
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Injecting through properties is also allowed as follows.
|
||||
|
||||
> [!WARNING]
|
||||
> Dependency Injection will not resolve missing services in property injection, and it will not pick a constructor instead.
|
||||
> If a publically accessible property is attempted to be injected and its service is missing, the application will throw an error.
|
||||
> If a publicly accessible property is attempted to be injected and its service is missing, the application will throw an error.
|
||||
|
||||
## Using the provider itself
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ uid: Guides.DI.Scaling
|
||||
title: Scaling your DI
|
||||
---
|
||||
|
||||
# Scaling your DI
|
||||
# Scaling your DI
|
||||
|
||||
Dependency injection has a lot of use cases, and is very suitable for scaled applications.
|
||||
There are a few ways to make registering & using services easier in large amounts.
|
||||
|
||||
@@ -18,7 +18,7 @@ Casting only works for types that inherit the base type that you want to unbox f
|
||||
A boxed object is the definition of an object that was simplified (or trimmed) by incoming traffic,
|
||||
but still owns the data of the originally constructed type. Boxing is an implicit operation.
|
||||
|
||||
Through casting, we can **unbox** this type, and access the properties that were unaccessible before.
|
||||
Through casting, we can **unbox** this type, and access the properties that were inaccessible before.
|
||||
|
||||
## Unboxing
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ exist under a category.
|
||||

|
||||
|
||||
* A **Slash command** ([ISlashCommandInteraction]) is an application command executed in the text box, with provided parameters.
|
||||
* A **Message Command** ([IMessageCommandInteraction]) is an application command targetting a message.
|
||||
* An **User Command** ([IUserCommandInteraction]) is an application command targetting a user.
|
||||
* A **Message Command** ([IMessageCommandInteraction]) is an application command targeting a message.
|
||||
* An **User Command** ([IUserCommandInteraction]) is an application command targeting a user.
|
||||
* An **Application Command** ([IApplicationCommandInteraction]) is any of the above.
|
||||
* A **Message component** ([IMessageComponent]) is the interaction of a button being clicked/dropdown option(s) entered.
|
||||
* An **Autocomplete Interaction** ([IAutocompleteinteraction]) is an interaction that has been automatically completed.
|
||||
|
||||
@@ -28,4 +28,4 @@ var guild = client.GetGuild(guildId);
|
||||
var guildEvent = await guild.CreateEventAsync("test event", DateTimeOffset.UtcNow.AddDays(1), GuildScheduledEventType.External, endTime: DateTimeOffset.UtcNow.AddDays(2), location: "Space");
|
||||
```
|
||||
|
||||
This code will create an event that lasts a day and starts tomorrow. It will be an external event thats in space.
|
||||
This code will create an event that lasts a day and starts tomorrow. It will be an external event that's in space.
|
||||
|
||||
@@ -5,7 +5,7 @@ title: Introduction to Guild Events
|
||||
|
||||
# Guild Events
|
||||
|
||||
Guild events are a way to host events within a guild. They offer alot of features and flexibility.
|
||||
Guild events are a way to host events within a guild. They offer a lot of features and flexibility.
|
||||
|
||||
## Getting started with guild events
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ title: Modifying Guild Events
|
||||
|
||||
# Modifying Events
|
||||
|
||||
You can modify events using the `ModifyAsync` method to modify the event, heres the properties you can modify:
|
||||
You can modify events using the `ModifyAsync` method to modify the event. Here are the properties you can modify:
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | --------------------------------- | -------------------------------------------- |
|
||||
|
||||
@@ -107,7 +107,7 @@ By default, your methods can feature the following parameter types:
|
||||
| `IVoiceChannel` | Voice Channels |
|
||||
| `IDMChannel` | DM Channels |
|
||||
| `IGroupChannel` | Group Channels |
|
||||
| `ICategory Channel` | Category Channels |
|
||||
| `ICategoryChannel` | Category Channels |
|
||||
| `INewsChannel` | News Channels |
|
||||
| `IThreadChannel` | Public, Private, News Threads |
|
||||
| `ITextChannel` | Text Channels |
|
||||
@@ -200,7 +200,7 @@ And the captured words will be passed on to the command method in the same order
|
||||
You may use as many wild card characters as you want.
|
||||
|
||||
> [!NOTE]
|
||||
> If Interaction Service recieves a component interaction with **player:play,rickroll** custom id,
|
||||
> If Interaction Service receives a component interaction with **player:play,rickroll** custom id,
|
||||
> `op` will be *play* and `name` will be *rickroll*
|
||||
|
||||
## Select Menus
|
||||
@@ -233,9 +233,9 @@ A Modal implementation would look like this:
|
||||
[!code-csharp[Modal Command](samples/intro/modal.cs)]
|
||||
|
||||
> [!NOTE]
|
||||
> If you are using Modals in the interaction service it is **highly
|
||||
> If you are using Modals in the interaction service it is **highly
|
||||
> recommended** that you enable `PreCompiledLambdas` in your config
|
||||
> to prevent performance issues.
|
||||
> to prevent performance issues.
|
||||
|
||||
## Interaction Context
|
||||
|
||||
@@ -262,7 +262,7 @@ One problem with using the concrete type InteractionContexts is that you cannot
|
||||
|
||||
> [!INFO]
|
||||
> Message component interactions have access to a special method called `UpdateAsync()` to update the body of the method the interaction originated from.
|
||||
> Normally this wouldn't be accessable without casting the `Context.Interaction`.
|
||||
> Normally this wouldn't be accessible without casting the `Context.Interaction`.
|
||||
|
||||
[!code-csharp[Context Example](samples/intro/context.cs)]
|
||||
|
||||
@@ -291,7 +291,7 @@ Module groups allow you to create sub-commands and sub-commands groups.
|
||||
By nesting commands inside a module that is tagged with [GroupAttribute] you can create prefixed commands.
|
||||
|
||||
> [!WARNING]
|
||||
> Although creating nested module stuctures are allowed,
|
||||
> Although creating nested module structures are allowed,
|
||||
> you are not permitted to use more than 2 [GroupAttribute]'s in module hierarchy.
|
||||
|
||||
> [!NOTE]
|
||||
@@ -318,7 +318,7 @@ An example of executing a command from an event can be seen here:
|
||||
|
||||
[!code-csharp[Command Event Example](samples/intro/event.cs)]
|
||||
|
||||
Commands can be either executed on the gateway thread or on a seperate thread from the thread pool.
|
||||
Commands can be either executed on the gateway thread or on a separate thread from the thread pool.
|
||||
This behaviour can be configured by changing the `RunMode` property of `InteractionServiceConfig` or by setting the *runMode* parameter of a command attribute.
|
||||
|
||||
> [!WARNING]
|
||||
@@ -354,12 +354,12 @@ can be used to register cherry picked modules or commands to global/guild scopes
|
||||
|
||||
> [!NOTE]
|
||||
> In debug environment, since Global commands can take up to 1 hour to register/update,
|
||||
> it is adviced to register your commands to a test guild for your changes to take effect immediately.
|
||||
> it is advised to register your commands to a test guild for your changes to take effect immediately.
|
||||
> You can use preprocessor directives to create a simple logic for registering commands as seen above.
|
||||
|
||||
## Interaction Utility
|
||||
|
||||
Interaction Service ships with a static `InteractionUtiliy`
|
||||
Interaction Service ships with a static `InteractionUtility`
|
||||
class which contains some helper methods to asynchronously waiting for Discord Interactions.
|
||||
For instance, `WaitForInteractionAsync()` method allows you to wait for an Interaction for a given amount of time.
|
||||
This method returns the first encountered Interaction that satisfies the provided predicate.
|
||||
@@ -370,7 +370,7 @@ This method returns the first encountered Interaction that satisfies the provide
|
||||
|
||||
## Webhook Based Interactions
|
||||
|
||||
Instead of using the gateway to recieve Discord Interactions, Discord allows you to recieve Interaction events over Webhooks.
|
||||
Instead of using the gateway to receive Discord Interactions, Discord allows you to receive Interaction events over Webhooks.
|
||||
Interaction Service also supports this Interaction type but to be able to
|
||||
respond to the Interactions within your command modules you need to perform the following:
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Interaction Result come in a handful of different flavours:
|
||||
|
||||
> [!NOTE]
|
||||
> You can either use the [IResult.Error] property of an Interaction result or create type check for the
|
||||
> afformentioned result types to branch out your post-execution logic to handle different situations.
|
||||
> aforementioned result types to branch out your post-execution logic to handle different situations.
|
||||
|
||||
|
||||
[AutocompletionResult]: xref:Discord.AutocompleteResult
|
||||
|
||||
@@ -9,8 +9,8 @@ title: Introduction to the Chat Command Service
|
||||
command parser.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The 'Message Content' intent, required for text commands, is now a
|
||||
> privilleged intent. Please use [Slash commands](xref:Guides.SlashCommands.Intro)
|
||||
> The 'Message Content' intent, required for text commands, is now a
|
||||
> privileged intent. Please use [Slash commands](xref:Guides.SlashCommands.Intro)
|
||||
> instead for making commands. For more information about this change
|
||||
> please check [this announcement made by discord](https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ bot. (When developing on .NET Framework, this would be `bin/debug`,
|
||||
when developing on .NET Core, this is where you execute `dotnet run`
|
||||
from; typically the same directory as your csproj).
|
||||
|
||||
**For Windows users, precompiled binaries are available for your convienence [here](https://github.com/discord-net/Discord.Net/tree/dev/voice-natives).**
|
||||
**For Windows users, precompiled binaries are available for your convenience [here](https://github.com/discord-net/Discord.Net/tree/dev/voice-natives).**
|
||||
|
||||
**For Linux users, you will need to compile [Sodium] and [Opus] from source, or install them from your package manager.**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user