Skip to content

AI-powered Discord bot for the SMPHorizon Minecraft server — includes session management, server status, player stats, XP, moderation, and intelligent chat.

Notifications You must be signed in to change notification settings

SarabdeepSBilkhu/SMPHorizon_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🟩 SMPHorizon Discord Bot

A powerful Discord bot built for the SMPHorizon Minecraft community.
It handles Minecraft voice sessions, AI chat, persistent player memory, XP tracking, moderation, and Aternos server status — all in one package.


🚀 Features

🎮 Minecraft Controls

  • /session — Create a temporary Minecraft VC session
  • /end — End the session & log playtime
  • /who — See who’s currently playing
  • /leaderboard — Show top players by total minutes
  • /mcstatus — Live Aternos server status (players, version, MOTD)

🤖 AI Assistant (Groq-Powered)

  • @mention the bot to chat naturally
  • DM the bot for private AI conversations
  • Long-term memory system — remembers user details
  • Hourly chat summaries to a channel (optional)
  • Uses Llama-3.1 8B Instant via Groq API

🧹 Moderation

  • Deletes banned words
  • Warns users
  • Handles missing permissions gracefully

📊 XP & Utility

  • XP system based on chat activity
  • /level — Show XP
  • /assign — Gives the gamer role: professional_gaymer
  • /hello — Friendly greeting
  • /uptime — Shows bot runtime
  • /help — Full command + AI overview

📦 Installation (Local Development)

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/SMPHorizon_Bot.git
cd SMPHorizon_Bot

2. Create a virtual environment

python -m venv venv
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate

3. Install required packages

pip install -r requirements.txt

4. Create a .env file

DISCORD_TOKEN=your_discord_bot_token
GROQ_API_KEY=your_groq_api_key
GUILD_ID=your_discord_server_id
SUMMARY_CHANNEL_ID=optional_channel_id

🚢 Deployment Guide

► Railway

  1. Create a New Project → Deploy from GitHub

  2. Add Environment Variables:

    • DISCORD_TOKEN
    • GROQ_API_KEY
    • GUILD_ID
    • SUMMARY_CHANNEL_ID (optional)
  3. Railway auto-installs dependencies from requirements.txt

  4. Start Command:

    python main.py
    

📂 Project Structure

SMPHorizon_Bot/
│
├── main.py
├── sessions.db
├── requirements.txt
├── README.md
├── .gitignore
└── .env

🧠 Technologies Used

  • Python 3.11+
  • discord.py 2.6.4
  • mcstatus 12.0.6
  • aiohttp 3.13.2
  • SQLite (persistent sessions, XP, AI memory)
  • Groq API (Llama-3.1 AI)

🔒 Security Notes

  • Regenerate your bot token if leaked
  • SQLite DB automatically updates user memory and logs

📜 License

MIT — free to modify and distribute.


⭐ Contributing

Pull requests welcome! If you want extra features (music bot, ranking system, web dashboard), feel free to open an issue.


About

AI-powered Discord bot for the SMPHorizon Minecraft server — includes session management, server status, player stats, XP, moderation, and intelligent chat.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages