Skip to content

mwcyu/DiscordBotV1

Repository files navigation

Discord Bot V1

A Discord bot for managing raid absences and other utility functions.

Features

  • Raid absence management
  • Multi-server support
  • MongoDB data persistence
  • Express health check endpoints

Setup Instructions

1. Prerequisites

  • Node.js 22.x or higher
  • MongoDB database
  • Discord Bot Token

2. Discord Bot Setup

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Go to "Bot" section and create a bot
  4. Copy the bot token
  5. Copy the Application ID from "General Information"

3. Bot Permissions

When inviting the bot to servers, ensure it has these permissions:

  • Send Messages
  • Use Slash Commands
  • Read Message History
  • Embed Links

4. Environment Configuration

  1. Copy .env.example to .env
  2. Fill in your values:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_application_id_here
MONGO_URI=mongodb://localhost:27017/discordbot
PORT=8080

5. Installation

npm install

6. Deploy Commands (First Time)

npm run deploy

7. Start the Bot

npm start

Development

For development with hot reload:

npm run dev

Commands

  • /absent - Mark an absence for raid dates
  • /absentlist - View absence list
  • /absentremove - Remove your own absence
  • /absentremoveadmin - Admin command to remove any absence

Troubleshooting

Bot doesn't respond to commands

  1. Make sure commands are deployed: npm run deploy
  2. Check bot permissions in the server
  3. Verify bot token and client ID are correct
  4. Check MongoDB connection

Commands not showing up

  • Global commands can take up to 1 hour to appear
  • For testing, use npm run dev which deploys to a specific guild instantly

Database errors

  • Ensure MongoDB is running and accessible
  • Check MONGO_URI in your .env file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors