Overview
This guide walks you through creating and configuring your AutoResponse bot on Discord.Prerequisites
- Node.js v16 or higher
- A Discord account
- Basic command line knowledge
Creating Your Discord Bot
Access Discord Developer Portal
Navigate to the Discord Developer Portal and sign in with your Discord account.
Create New Application
Click the New Application button in the top right corner.Give your application a name (e.g., “AutoResponse”) and accept Discord’s Terms of Service.
Navigate to Bot Section
In the left sidebar, click on Bot to access the bot configuration page.Click Add Bot to convert your application into a bot user.
Configure Bot Intents
Scroll down to the Privileged Gateway Intents section and enable:
- Presence Intent
- Server Members Intent
- Message Content Intent
Your bot must have these intents enabled to read message content and respond to users.
Inviting Your Bot to a Server
Navigate to OAuth2 Section
In the left sidebar of the Discord Developer Portal, click on OAuth2 > URL Generator.
Configure Bot Permissions
Under Bot Permissions, select the following permissions:
- Read Messages/View Channels
- Send Messages
- Send Messages in Threads
- Embed Links
- Attach Files
- Read Message History
- Add Reactions
- Use Slash Commands
Initial Configuration
After setting up your bot on Discord, you need to configure your local environment:-
Create Environment File
Create a
.envfile in your project root (see Environment Variables) -
Install Dependencies
-
Start the Bot
- Verify Bot is Online Check your Discord server - your bot should now appear online!
Next Steps
Configure Permissions
Set up Discord permissions and user privacy controls
Environment Variables
Configure your bot’s environment variables
Database Setup
Understand the bot’s database structure
Commands
Learn about available slash commands