* Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article)pull/1161/head
@@ -37,7 +37,7 @@ based on various conditions. | |||||
 |  | ||||
The ID can be seen by anyone; it is public. It is merely used to | |||||
Anyone can see the ID; it is public. It is merely used to | |||||
identify an object in the Discord ecosystem. Many things in the | identify an object in the Discord ecosystem. Many things in the | ||||
Discord ecosystem require an ID to retrieve or identify the said | Discord ecosystem require an ID to retrieve or identify the said | ||||
object. | object. | ||||
@@ -43,7 +43,7 @@ The first step to creating commands is to create a _module_. | |||||
A module is an organizational pattern that allows you to write your | A module is an organizational pattern that allows you to write your | ||||
commands in different classes and have them automatically loaded. | commands in different classes and have them automatically loaded. | ||||
Discord.Net's implementation of "modules" is influenced heavily from | |||||
Discord.Net's implementation of "modules" is influenced heavily by the | |||||
ASP.NET Core's Controller pattern. This means that the lifetime of a | ASP.NET Core's Controller pattern. This means that the lifetime of a | ||||
module instance is only as long as the command is being invoked. | module instance is only as long as the command is being invoked. | ||||
@@ -5,15 +5,15 @@ title: Start making a bot | |||||
# Making a Ping-Pong bot | # Making a Ping-Pong bot | ||||
One of ways to get started with the Discord API is to write a basic | |||||
ping-pong bot. This bot will respond to a simple command "ping." | |||||
One of the ways to get started with the Discord API is to write a | |||||
basic ping-pong bot. This bot will respond to a simple command "ping." | |||||
We will expand on this to create more diverse commands later, but for | We will expand on this to create more diverse commands later, but for | ||||
now, it is a good starting point. | now, it is a good starting point. | ||||
## Creating a Discord Bot | ## Creating a Discord Bot | ||||
Before writing your bot, it is necessary to create a bot account via the | |||||
Discord Applications Portal first. | |||||
Before writing your bot, it is necessary to create a bot account via | |||||
the Discord Applications Portal first. | |||||
1. Visit the [Discord Applications Portal]. | 1. Visit the [Discord Applications Portal]. | ||||
2. Create a New Application. | 2. Create a New Application. | ||||
@@ -51,7 +51,7 @@ through the OAuth2 flow. | |||||
4. Open the generated authorization URL in your browser. | 4. Open the generated authorization URL in your browser. | ||||
5. Select a server. | 5. Select a server. | ||||
6. Click on authorize. | |||||
6. Click on Authorize. | |||||
> [!NOTE] | > [!NOTE] | ||||
> Only servers where you have the `MANAGE_SERVER` permission will be | > Only servers where you have the `MANAGE_SERVER` permission will be | ||||
@@ -70,7 +70,7 @@ For more information, see @Guides.GettingStarted.Installation. | |||||
Discord.Net uses .NET's [Task-based Asynchronous Pattern (TAP)] | Discord.Net uses .NET's [Task-based Asynchronous Pattern (TAP)] | ||||
extensively - nearly every operation is asynchronous. It is highly | extensively - nearly every operation is asynchronous. It is highly | ||||
recommended that these operations are awaited in a | |||||
recommended for these operations to be awaited in a | |||||
properly established async context whenever possible. | properly established async context whenever possible. | ||||
To establish an async context, we will be creating an async main method | To establish an async context, we will be creating an async main method | ||||
@@ -80,7 +80,7 @@ invoke the new async main. | |||||
[!code-csharp[Async Context](samples/first-bot/async-context.cs)] | [!code-csharp[Async Context](samples/first-bot/async-context.cs)] | ||||
As a result of this, your program will now start and immediately | As a result of this, your program will now start and immediately | ||||
jump into an async context. This will allow us to create a connection | |||||
jump into an async context. This allows us to create a connection | |||||
to Discord later on without having to worry about setting up the | to Discord later on without having to worry about setting up the | ||||
correct async implementation. | correct async implementation. | ||||
@@ -133,7 +133,7 @@ Before connecting, we should hook the client's `Log` event to the | |||||
log handler that we had just created. Events in Discord.Net work | log handler that we had just created. Events in Discord.Net work | ||||
similarly to any other events in C#. | similarly to any other events in C#. | ||||
Next, you will need to "login to Discord" with the [LoginAsync] | |||||
Next, you will need to "log in to Discord" with the [LoginAsync] | |||||
method with the application's "token." | method with the application's "token." | ||||
> [!NOTE] | > [!NOTE] | ||||
@@ -127,8 +127,8 @@ Studio installation. | |||||
### Installing on Unsupported WebSocket Platform | ### Installing on Unsupported WebSocket Platform | ||||
For older system such as Windows 7 or earlier that do not natively | |||||
support WebSocket, you may encounter | |||||
For an older operating system such as Windows 7 or earlier that does | |||||
not natively support WebSocket, you may encounter | |||||
@System.PlatformNotSupportedException upon connection. | @System.PlatformNotSupportedException upon connection. | ||||
You may resolve this by either targeting .NET Core 2.1 or later, or | You may resolve this by either targeting .NET Core 2.1 or later, or | ||||
@@ -137,9 +137,9 @@ by installing one or more custom packages as listed below. | |||||
#### [Targeting .NET Core 2.1](#tab/core2-1) | #### [Targeting .NET Core 2.1](#tab/core2-1) | ||||
First, make sure your installed SDK supports .NET Core 2.1. | First, make sure your installed SDK supports .NET Core 2.1. | ||||
Enter `dotnet --version`; the version number should be equal to or above | |||||
`2.1.300`. If not, visit [.NET Core SDK] website to download the latest | |||||
version. | |||||
Enter `dotnet --version`; the version number should be equal to or | |||||
above `2.1.300`. If not, visit the [.NET Core SDK] website to download | |||||
the latest version. | |||||
Next, ensure your project is set to target Core 2.1; you should replace | Next, ensure your project is set to target Core 2.1; you should replace | ||||
the `<TargetFramework>` tag in your project file to `netcoreapp2.1` or | the `<TargetFramework>` tag in your project file to `netcoreapp2.1` or | ||||