D++ (DPP)
C++ Discord API Bot Library
Creating a Bot Token

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.

Creating a New Bot

To create a new application, take the steps as follows:

  1. Sign in to the Discord developer portal and click on "New Application" on the top right.
  2. Next, enter a name for the application in the pop-up and press the "Create" button.
    In this example we named it "D++ Test Bot".
  3. Move on by click the "Bot" tab in the left-hand side of the screen. Now click the "Add Bot" button on the right and confirm that you want to add the bot to your application.
    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: OTAyOTMxODU1NTU1MzE3ODUw.YXlm0g.9oYCt-XHXVH_z9qAytzmVRzKWTg
Warning
Do not share this token with anybody! If you ever somehow compromise your current bot token or see your bot in danger, you can regenerate the token in the panel.
Note
This token can only be seen once. We highly recommend that, if you're going to be reusing your token, you store it in a VERY safe place (like a password manager).

Adding the Bot to Your Server

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.

  1. Go again into the Applications page and click on your bot.
  2. Go to the "OAuth2" tab and click on the subpage "URL Generator".
  3. Select the bot scope.
Note
For bots, you ONLY need the bot scope, nearly all of the other scopes are related to non-bot applications (external programs that communicate with Discord, such as Logitech G Hub). Whilst you can also select the applications.commands scope, the bot scope will automatically include this silently. You can read more about scopes and which ones you might need for your application here.
  1. Choose the permissions required for your bot to function in the "Bot Permissions" section.
  2. Copy and paste the resulting URL in your browser. Choose a server to invite the bot to, and click "Authorize".
Note
For bots with elevated permissions, Discord enforces two-factor authentication on the bot owner's account when added to servers that have server-wide 2FA enabled.

Troubleshooting

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0