A feature-packed Discord bot designed for seamless server management, automated tasks, and community engagement. Pre-configured for easy deployment and hosting on Render.
- Slash Commands: Modern Discord slash command integration.
- 24/7 Cloud Ready: Optimized for continuous uptime on cloud platforms like Render.
- Modular Architecture: Clean code structure for adding commands and handlers effortlessly.
- Environment Driven: Secure credential and token management using environment variables.
Before setting up or deploying, ensure you have:
- A Discord Application & Bot Token from the Discord Developer Portal.
- Bot Privileged Gateway Intents enabled (e.g., Message Content, Guild Members) according to your bot's needs.
- A Render account for deployment.
Add these key-value pairs in your local .env file or directly inside your Render project settings:
| Variable | Description | Required |
|---|---|---|
DISCORD_TOKEN |
Your Discord Bot Token | Yes |
CLIENT_ID |
Discord Application / Client ID | Yes |
GUILD_ID |
Server ID (optional, useful for fast test command registration) | No |
PORT |
Web server port (Required if deploying as a Render Web Service) | Yes (Render default: 10000) |
Render supports hosting Discord bots via Web Service or Background Worker.
- Log in to the Render Dashboard.
- Click New +
$\rightarrow$ Web Service. - Connect your GitHub repository (
askaine/DisBot). - Configure the service:
- Name:
disbot - Runtime:
Node(orPythonif applicable) - Build Command:
npm install - Start Command:
npm start
- Navigate to Environment Variables and add
DISCORD_TOKENandCLIENT_ID. - Click Create Web Service.
Note: Render Web Services expect an active HTTP server binding to
process.env.PORT. If your bot script does not host a web server (e.g., Express/Fastify), add a basic HTTP endpoint to keep Render health checks passing.
- Click New +
$\rightarrow$ Background Worker. - Connect your repository (
askaine/DisBot). - Set your Build Command (
npm install) and Start Command (npm start). - Add your
DISCORD_TOKENin the Environment Variables section. - Click Create Background Worker.
- Clone the repository:
git clone https://github.com/askaine/DisBot.git
cd DisBot
- Install dependencies:
npm install
- Configure Environment File:
Create a
.envfile in the root directory:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
PORT=3000
- Start the bot locally:
npm start
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request on the GitHub Repository.
Distributed under the MIT License.