Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DisBot 🤖

A feature-packed Discord bot designed for seamless server management, automated tasks, and community engagement. Pre-configured for easy deployment and hosting on Render.


🚀 Features

  • 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.

📋 Prerequisites

Before setting up or deploying, ensure you have:

  1. A Discord Application & Bot Token from the Discord Developer Portal.
  2. Bot Privileged Gateway Intents enabled (e.g., Message Content, Guild Members) according to your bot's needs.
  3. A Render account for deployment.

⚙️ Environment Variables

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)

🌐 Deployment on Render

Render supports hosting Discord bots via Web Service or Background Worker.

Option A: Web Service (Recommended for Free Tier Uptime)

  1. Log in to the Render Dashboard.
  2. Click New + $\rightarrow$ Web Service.
  3. Connect your GitHub repository (askaine/DisBot).
  4. Configure the service:
  • Name: disbot
  • Runtime: Node (or Python if applicable)
  • Build Command: npm install
  • Start Command: npm start
  1. Navigate to Environment Variables and add DISCORD_TOKEN and CLIENT_ID.
  2. 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.

Option B: Background Worker

  1. Click New + $\rightarrow$ Background Worker.
  2. Connect your repository (askaine/DisBot).
  3. Set your Build Command (npm install) and Start Command (npm start).
  4. Add your DISCORD_TOKEN in the Environment Variables section.
  5. Click Create Background Worker.

💻 Local Installation & Setup

  1. Clone the repository:
git clone https://github.com/askaine/DisBot.git
cd DisBot
  1. Install dependencies:
npm install
  1. Configure Environment File: Create a .env file in the root directory:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
PORT=3000
  1. Start the bot locally:
npm start

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request on the GitHub Repository.


📜 License

Distributed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages