C++ Discord API Bot Library
Before you start coding, you need to create and register your bot in the Discord developer portal. You can then add this bot to your Discord-server.
To create a new application, take the steps as follows:
In this example we named it "D++ Test Bot".
On the resulting screen, you’ll note a page with information regarding your new bot. You can edit your bot name, description, and avatar here if you want to. If you wish to read the message content from messages, you need to enable the message content intent in the "Privileged Gateway Intents" section.
In this panel, you can get your bot token by clicking "Reset Token". A bot token looks like this:
Once you've created your bot in the discord developer portal, you may wonder:
Where is my bot now, I can't see him on my server?!
That's because you've created a bot application, but it's not on any server right now.
So to invite the bot to your server, you must create an invitation URL.
botscope. If your bot uses slash commands, also select
You can read more about scopes and which you need for your application here.