LogoRobo.js

Credentials

Configure Discord authentication

Your bot needs a token and client ID to connect to Discord. These values are stored in a .env file that Robo.js loads automatically at startup.

Required Variables

VariableDescription
DISCORD_TOKENBot authentication token
DISCORD_CLIENT_IDApplication ID

Create an Application

If you don't have an application yet:

  1. Open discord.com/developers/applications and sign in.
  2. Click New Application, give it a name, and confirm.

Discord automatically creates a bot user for the application — no separate step is needed.

Discord Developer Portal Applications page showing the New Application button in the top right corner, with the applications list visible below

FocusThe New Application button and the applications listZoom100%NotesOpen discord.com/developers/applications. Show the main applications page with the 'New Application' button prominently visible in the top right.

Bot Token

Obtain the token from the Discord Developer Portal:

  1. Open discord.com/developers/applications and sign in.
  2. Select your application.
  3. Navigate to the Bot tab.
  4. Click Reset Token and copy the value.

The token is shown only once. Store it immediately in your .env file.

Discord Developer Portal Bot tab with the token section visible, showing the Reset Token button and Copy button, with the Privileged Gateway Intents section partially visible below

FocusThe token section with Reset Token and Copy buttonsZoom100%NotesNavigate to your application's Bot tab. Focus on the token section showing the Reset Token button. If a token is visible, blur or redact it.

Add it to your .env file:

# .env
DISCORD_TOKEN="your_bot_token"

Client ID

Find the application ID in the portal:

  1. Select your application.
  2. Navigate to General Information.
  3. Copy the Application ID.

The DISCORD_CLIENT_ID is the same as the Application ID shown in the Developer Portal. Discord uses "Application ID" and "Client ID" interchangeably.

Add it to your .env file:

# .env
DISCORD_CLIENT_ID="your_application_id"

Optional Variables

VariableDescription
DISCORD_GUILD_IDTest server ID for scoped command registration. Commands deploy only to this server during development, which is faster than global registration.
DISCORD_DEBUG_CHANNEL_IDChannel ID for forwarding background errors. Async errors are sent to this channel instead of failing silently.

Developer Mode

Enable Developer Mode in Discord to copy IDs for servers, channels, and users:

  1. Open Discord and go to User Settings.
  2. Navigate to Advanced.
  3. Toggle Developer Mode on.

With Developer Mode enabled, right-click any server, channel, or user to copy its ID.

Discord user settings Advanced page with the Developer Mode toggle switch turned on, showing the setting description explaining that Developer Mode enables Copy ID in context menus

FocusThe Developer Mode toggle in the on positionZoom100%NotesOpen Discord User Settings, navigate to Advanced. Show the Developer Mode toggle in the ON position. Include the Advanced heading and toggle description.

Security

Never commit your .env file to version control. Robo.js includes .env in .gitignore by default when scaffolding a project.

If you accidentally expose your token, regenerate it immediately in the Discord Developer Portal under the Bot tab.

Next Steps

On this page