You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

getting_started.rst 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Getting Started
  2. ===============
  3. Requirements
  4. ------------
  5. Discord.Net currently requires logging in with a claimed account - anonymous logins are not supported. You can `register for a Discord account here`.
  6. New accounts are also useless when not connected to a server, so you should create an invite code for whatever server you intend to test on using the official Discord client.
  7. .. _register for a Discord account here: https://discordapp.com/register
  8. Installation
  9. ------------
  10. You can get Discord.Net from NuGet:
  11. * `Discord.Net`_
  12. * `Discord.Net.Commands`_
  13. You can also pull the latest source from `GitHub`_
  14. .. _Discord.Net: https://discordapp.com/register
  15. .. _Discord.Net.Commands: https://discordapp.com/register
  16. .. _GitHub: https://github.com/RogueException/Discord.Net/>
  17. Async
  18. -----
  19. Discord.Net uses C# tasks extensively - nearly all operations return one. It is highly recommended that these tasks be awaited whenever possible.
  20. To do so requires the calling method be marked as async, which can be problematic in a console application. An example of how to get around this is provided below.
  21. For more information, go to `MSDN's Await-Async section`_.
  22. .. _MSDN's Await-Async section: https://msdn.microsoft.com/en-us/library/hh191443.aspx
  23. Example
  24. -------
  25. .. literalinclude:: samples/getting_started.cs
  26. :language: csharp6
  27. :tab-width: 2