Unified moderation and utility platform for Discord and Telegram, featuring music, games, schedules, and community management.
- ๐ 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
- ๐ต 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
- ๐ Schedule Integration - Sync and manage events
- ๐ Discord Synchronization - Cross-platform data sharing
- Python 3.8+
- PostgreSQL
- Java Runtime Environment (for Lavalink)
-
Clone repository
git clone https://github.com/Zebaro24/University-Moderation.git cd university-moderation -
Create virtual environment
python -m venv venv # Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
Copy.env.exampleto.envand 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
-
Set up Lavalink
- Configure
application.yml - Start the server:
java -jar Lavalink.jar
- Configure
python worker.pydiscord_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| Discord Features | Telegram Features |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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)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}!")- Developer: Denys Shcherbatyi
- Email: zebaro.work@gmail.com







