📄
Discord Features Handler Docs
  • discord-features-handler documentation
  • Getting Started
    • Quick Start
    • Environment Variables
    • DiscordFeaturesHandler Setup
  • Layout
    • Folder Structure
    • Setting up Commands
      • Setting up Slash Commands
      • Setting up other interactions
    • Setting up Events
  • Built-in
    • Disabling Built-in Commands and Events
    • Built-in Functions
    • Built-in config.js file
    • Built-in Customizable Commands
      • Built-in Help Command
      • Built-in Reload Command
    • Built-in Customizable Events
      • Built-in MessageCreate Event
      • Built-in interactionCreate Event
  • References
    • Roadmap
    • ChangeLog
Powered by GitBook
On this page
  1. Getting Started

Environment Variables

PreviousQuick StartNextDiscordFeaturesHandler Setup

Last updated 1 year ago

Make sure to have a .gitignore file to prevent this being upload to github repo

Create your .env file with the following information:

DISCORD_TOKEN="YOUR_DISCORD_BOT_TOKEN"
OWNER_ID="YOUR_DISCORD_USER_ID"
CLIENT_ID="YOUR_BOT_CLIENT_ID"
DEVELOPMENT_GUILD_ID="YOUR_SERVER_ID"

You can find your bot Client Id: ( > "General Information" > application id)

In hosting server, such as heroku, there is a section to place your variables and do not need the .env unless you are hosting the bot on your local computer

To access the DISCORD_TOKEN or other environment variables you can just type process.env.DISCORD_TOKEN

You can access these variables by using process.env.VARIABLE_NAME

process.env.DISCORD_TOKEN

Discord Developer Portal