First of all, welcome! Before you delve into using the library, however, you should have some decent understanding of the language you are about to use. This library touches on TAP (Task-based Asynchronous Pattern), polymorphism, interface and many more advanced topics extensively. Please make sure that you understand these topics to some extent before proceeding.
Here are some examples:
Please note that you should not try to blindly copy paste the code. It is meant to be a template or a guide. It is not meant to be something that will work out of the box.
The OAuth2 URL can be generated via the Discord developer page. This allows you to set the permissions that the bot will be added with. With this method, bots will also be assigned their own special roles that normal users cannot use, which is what we call a Managed
role.
Each user and object on Discord has its own snowflake ID generated based on various conditions, see here. The ID can be seen by anyone; it is public. It is merely used to identify an object in the Discord ecosystem. Many things in the library require an ID to retrieve the said object.
There are 2 ways to obtain the said ID.
\
in front the object. For example, when you do \@Example#1234
, it will return the user ID of the aforementioned user.A token is a credential used to log into an account. This information should be kept private and for your eyes only. Anyone with your token can log into your account. This applies to both user and bot accounts. That also means that you should never ever hardcode your token or add it into source control, as your identity may be stolen by scrape bots on the internet that scours through constantly to obtain a token.
Several common ways to do this:
\
character in front.Please note that right-clicking on the role and copying the ID will not work. It will only copy the message ID.
Please visit us at #dotnet_discord-net at the Discord API server. Describe the problem in details to us, and preferably with the problematic code uploaded onto Hastebin.