Skip to content

๐Ÿค– Cross-platform bot for Discord & Telegram โ€” moderation, music, games, events, and scheduling. Powered by Python, PostgreSQL, Lavalink, and more.

Notifications You must be signed in to change notification settings

Zebaro24/University-Moderation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

University Moderation Bot ๐Ÿค–

Project Status Python Discord.py Telegram Bot API

Unified moderation and utility platform for Discord and Telegram, featuring music, games, schedules, and community management.


โœจ Core Features

Cross-Platform

  • ๐Ÿ”„ Unified Configuration - Single settings for both platforms
  • ๐Ÿ“ Centralized Logging - Comprehensive event and error tracking
  • ๐Ÿ—ƒ๏ธ Database Integration - PostgreSQL backend for persistent data
  • ๐Ÿ”„ Version Control - Track changes and updates

Discord-Specific

  • ๐ŸŽต Music Player - Stream music via Lavalink
  • ๐ŸŽฎ Mafia Game - Host mafia games on your server
  • ๐Ÿ‘‘ Role Management - Assign and moderate roles
  • ๐Ÿ“… Event Scheduling - Create and notify about events
  • ๐Ÿ”Š Voice Channel Automation - Dynamic voice channel creation
  • ๐ŸŒˆ RGB Decorations - Customize server appearance
  • ๐Ÿ“Š Activity Tracking - Monitor user engagement

Telegram-Specific

  • ๐Ÿ“… Schedule Integration - Sync and manage events
  • ๐Ÿ”„ Discord Synchronization - Cross-platform data sharing

๐Ÿงฐ Tech Stack

  • Core: Python
  • Discord: discord.py dislash.py
  • Telegram: pyTelegramBotAPI
  • Database: PostgreSQL psycopg2
  • Music: Lavalink wavelink
  • APIs: Spotify OpenWeatherMap
  • Web: FastAPI uvicorn
  • Utilities: scheduler pytz speedtest-cli xmltodict

โš™๏ธ Installation & Setup

Prerequisites

  • Python 3.8+
  • PostgreSQL
  • Java Runtime Environment (for Lavalink)

Steps

  1. Clone repository

    git clone https://github.com/Zebaro24/University-Moderation.git
    cd university-moderation
  2. Create virtual environment

    python -m venv venv
    # Windows
    venv\Scripts\activate
    # Linux/Mac
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment
    Copy .env.example to .env and fill in your details:

    TELEGRAM_API=your_telegram_token
    DISCORD_API=your_discord_token
    DB_NAME=database_name
    DB_USER=database_user
    DB_PASSWORD=database_password
    DB_HOST=localhost
    DB_PORT=5432
    SPOTIFY_CLIENT_ID=your_spotify_client_id
    SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
    OWM_API_KEY=your_openweathermap_key
  5. Set up Lavalink

    • Configure application.yml
    • Start the server:
    java -jar Lavalink.jar

๐Ÿš€ Launching the Bot

python worker.py

๐Ÿ—‚๏ธ Project Structure

discord_bot/          # Discord modules
โ”œโ”€โ”€ mafia/            # Mafia game mechanics
โ”œโ”€โ”€ music/            # Music player
โ”œโ”€โ”€ roles/            # Role management
โ”œโ”€โ”€ timetable/        # Schedule for Discord
telegram_bot/         # Telegram modules
โ”œโ”€โ”€ timetable/        # Schedule for Telegram
tg_ds/                # Shared functions
timetable/            # Core schedule logic
.env                  # Environment variables
config.py             # Application configuration
database_func.py      # Database functions
main_bot_function.py  # Core bot functions
requirements.txt      # Dependencies
worker.py             # Main executable

๐ŸŽฎ Feature Highlights

Discord Features Telegram Features
Features Features
Music Player Schedule
Mafia Game Morning greeting
Roles Status

๐Ÿ› ๏ธ API & Extensibility

Database Functions

Use database_func.py for database operations:

from database_func import add_event, get_events

# Add event
add_event(guild_id, "Meeting", "2023-12-31 20:00")

# Get events
events = get_events(guild_id)

Adding Discord Commands

from discord_bot.discord_command import register_command

@register_command(name="hello", description="Says hello")
async def hello(ctx):
    await ctx.send(f"Hello {ctx.author.name}!")

๐Ÿ“ฌ Contact

About

๐Ÿค– Cross-platform bot for Discord & Telegram โ€” moderation, music, games, events, and scheduling. Powered by Python, PostgreSQL, Lavalink, and more.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages