Browse Source

Improve clarity of intro guides

pull/1027/head
CyberCyclist GitHub 8 years ago
parent
commit
823ba5cb7b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      docs/guides/getting_started/intro.md

+ 8
- 7
docs/guides/getting_started/intro.md View File

@@ -110,15 +110,16 @@ the Console.

Finally, we can create a connection to Discord. Since we are writing
a bot, we will be using a [DiscordSocketClient] along with socket
entities. See the [terminology](terminology.md) if you're unsure of
the differences.
entities. See the [terminology](terminology.md) if you're unsure
the differences among `Discord.Net.Rest`, `Discord.Net.Rpc`,
and `Discord.Net.WebSocket`.

To do so, create an instance of [DiscordSocketClient] in your async
main, passing in a configuration object only if necessary. For most
users, the default will work fine.

Before connecting, we should hook the client's `Log` event to the
log handler that was just created. Events in Discord.Net work
log handler that you just created. Events in Discord.Net work
similarly to other events in C#, so hook this event the way that
you typically would.

@@ -143,10 +144,10 @@ start connection/reconnection logic. It is important to note that
Any methods that rely on the client's state should go in an event
handler.

Finally, we will want to block the async main method from returning
until after the application is exited. To do this, we can await an
infinite delay or any other blocking method, such as reading from
the console.
Finally, we will want to block the async main method from returning
when running the application. To block from returning, we can await
an infinite delay or any other blocking method, such as reading
from the console.

The following lines can now be added:



Loading…
Cancel
Save