Every Discord bot needs an application registered on Discord's own side first, this is a Discord requirement for all bots, not something specific to CodeBlock Studio.
- From a new Discord Bot project, the setup checklist links you straight to the Discord Developer Portal.
- Create a new application there (or use an existing one if you already have one).
- Under the Bot section, grab its bot token, a long secret string that lets whoever holds it fully control that bot.
- Generate an invite link (Discord's OAuth2 URL Generator, with the "bot" and "applications.commands" scopes, plus whatever permissions your bot needs), and use it to add the bot to your server.
- Paste the token where prompted in your CodeBlock Studio project's settings.
Keeping your token safe
Your bot token is effectively the password to your bot, anyone who has it can control it directly, bypassing CodeBlock Studio entirely. Never share it, paste it into a public repository, or post it anywhere public. If you ever suspect it's been exposed, regenerate it immediately from the Developer Portal (this invalidates the old one) and update it in your project's settings.