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.

README.md 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Discord.Net #
  2. [![Discord](https://discordapp.com/api/guilds/81384788765712384/widget.png)](https://discord.gg/discord-api)
  3. An unofficial .NET library for the [Discord API](https://discordapp.com/).
  4. ## Installation ##
  5. Our stable builds available from NuGet through the Discord.Net metapackage:
  6. [Discord.Net](https://www.nuget.org/packages/Discord.Net/)
  7. Unstable "nightly" builds are available through our MyGet feed:
  8. `https://www.myget.org/F/discord-net/api/v3/index.json`
  9. ## Building ##
  10. At minimum, .NET Core 2.1 is required to successfully build Discord.Net,
  11. but .NET Core 3.1 is recommended. You should install the appropriate tools and
  12. components for your editor to open the Discord.Net solution file:
  13. - The .NET Core workload for Visual Studio
  14. - The C# build tools for Visual Studio Code
  15. - The .NET Core SDK for command line
  16. ### Versioning ###
  17. As a rule, Discord.Net attempts to follow
  18. [Semantic Versioning](https://semver.org). This means `MAJOR.MINOR.PATCH`
  19. versioning.
  20. However, as Discord evolves and adds or changes existing endpoints, we may need
  21. to add code to support these changes. To do this, we increment the minor version
  22. when adding new API surfaces to the library. To counter any inevitable breaking
  23. changes, we have decided that our public interfaces should be for
  24. *consumption only* - bot developers should not need to implement these
  25. interfaces for normal code.
  26. Additionally, as the Discord API changes, we may need to add, remove, or change
  27. parameters to certain methods. To ensure this breaks as little code as
  28. possible, we use the following approach to deprecate old APIs and redirect
  29. users to new APIs, while retaining binary compatibility:
  30. ```cs
  31. // OLD API
  32. [Obsolete("This API has been superseded by GetUserAsync.", false)]
  33. [EditorBrowsable(EditorBrowsableState.Never)]
  34. public ValueTask<IUser> GetUserAsync(ulong userId)
  35. => GetUserAsync(userId, "default");
  36. // NEW API
  37. public ValueTask<IUser> GetUserAsync(ulong userId,
  38. string additionalParameter = "default");
  39. ```
  40. These obsolete methods will be removed in the next major version, and will be
  41. clearly documented in our change logs.

No Description