Files
website/projekte des/website_project_description_en.txt
SimolZimol 09b0b2f3b7 new file: .gitignore
new file:   Dockerfile
	new file:   README.md
	new file:   app.py
	new file:   index.html
	new file:   projekte des/PROJECT_DESCRIPTION.txt
	new file:   projekte des/WEBSITE_DESCRIPTION.md
	new file:   projekte des/website_project_description_en.txt
	new file:   requirements.txt
	new file:   script.js
	new file:   static/css/styles.css
	new file:   static/js/script.js
	new file:   styles.css
	new file:   templates/about.html
	new file:   templates/base.html
	new file:   templates/contact.html
	new file:   templates/index.html
	new file:   templates/minecraft.html
	new file:   templates/project_detail.html
	new file:   templates/projects.html
2025-10-26 19:13:18 +01:00

96 lines
5.8 KiB
Plaintext

SimolZimol Discord AI Bot — Moderation, Giveaways, and Web Dashboard
Overview
A production-ready Discord bot built by SimolZimol that combines advanced moderation, a persistent giveaway engine with Steam/Epic game integration, AI-powered utilities, and a lightweight Flask-based admin dashboard. The project focuses on reliability, data persistence, and a great user experience for community servers.
Highlights
- Advanced Moderation System: Warnings, temporary mutes with automatic unmute, role restoration, detailed logs, and user-friendly commands with numeric and UUID identifiers.
- Persistent Giveaways: Robust giveaway engine with UUID-based IDs, sponsor attribution, Steam URL parsing (auto title/image), message auto-updates on edits, and restart-safe state via MySQL.
- Web Dashboard: Flask templates for server admin and user views (leaderboard, user data, settings, logs) to complement Discord commands.
- Reliability & Recovery: Active processes are tracked in the database and restored on startup so running giveaways are never lost.
- Clean UX: Rich embeds, buttons for joining giveaways, clear admin feedback, and helpful list/view commands for transparency.
Key Features
1) Moderation & Safety
- Warn and mute users with clear audit trails
- Temporary mutes stored in user_mutes table; auto-unmute + role restoration
- View/list mutes with status filters (active, completed, expired, cancelled)
- Mod log channel integration and smart notifications
2) Giveaways (Steam/Epic Ready)
- Start giveaways with title, subtitle, prize, duration, platform, sponsor, and optional game URL
- Steam integration via aiohttp: automatic game info extraction (title, image, short description)
- Sponsor handling: mention parsing to display a clean sponsor name in the embed footer
- UUID-based giveaway IDs for reliability across restarts and edits
- Edit giveaways after launch; the original Discord post updates automatically
- List giveaways from memory and database; load any giveaway back into memory on demand
- Full restart safety: active giveaways are restored when the bot starts
3) Web & Admin Experience
- Flask-powered pages (templates folder) for landing, dashboards, settings, users, logs, giveaways
- Complements Discord-first management with a browsable UI for staff and users
4) Observability & Logs
- Structured log files per day to simplify troubleshooting
- Clear status messages for admins after every critical action (create, edit, load)
Architecture at a Glance
- Language: Python
- Frameworks/Libraries: discord.py, Flask, aiohttp, aiomysql, regex, requests
- Data: MySQL (connection pooling) with tables for user data, mutes, and active processes
- Process Orchestration: A process manager persists and restores active tasks (e.g., running giveaways)
- Caching: In-memory maps for hot data with DB as the source of truth
- Background Workers: Queues for AI tasks and live chat processing
How Giveaways Work
1) Creation: Admin triggers a hybrid command; the bot builds a rich embed with join button and (optional) Steam info.
2) Persistence: A process entry is created in MySQL (active_processes) with all metadata and end time.
3) Participation: Users join via button; participants are tracked and persisted.
4) Editing: Admins can modify title/subtitle/prize/sponsor/duration; embeds update automatically.
5) Resilience: If the bot restarts, giveaways are restored from the database (including message IDs) and continue.
6) Completion: Winners are selected and recorded; sponsors and results can be announced.
Notable Technical Decisions
- UUIDs as Giveaway IDs: Avoids collisions and survives restarts; matches process UUIDs in the DB.
- Dual-Source Listing: listgiveaways reads both live memory and DB to present the complete picture.
- Message Update Pipeline: Each giveaway stores its message ID so edits can refresh the original post.
- Sponsor Mentions: Clean display names in embeds even when the raw input is a mention or handle.
Security & Permissions
- Local permission levels (5+ for moderators, higher for admins/owner)
- Command gating for sensitive operations (edit, load, list, config)
- Read-only fallbacks where appropriate to avoid destructive actions
What You Can Do With It
- Run a professional-grade community bot with moderation and giveaway tools
- Host sponsor-backed game key drops integrated with Steam/Epic pages
- Offer a friendly web dashboard for staff and users alongside Discord commands
Getting Started (Local)
- Requirements are listed in requirements.txt (Python 3.10+ recommended)
- Create a virtual environment and install dependencies
- Provide your Discord and database credentials via environment variables or config
- Start the bot (bot.py) and optional Flask app (app.py)
Production Notes
- Use a managed MySQL instance and set up proper connection pooling
- Run the bot in a process manager (e.g., systemd, pm2, or Docker as provided)
- Configure regular backups for the database (active processes, user_mutes, user_data)
- Rotate logs and monitor for rate limits or permission issues
Status & Roadmap
- Completed: Persistent mutes, restart-safe giveaways, Steam integration, sponsor support, message auto-updates, admin listing/editing
- In Progress: Quality-of-life improvements across dashboard and command UX
- Future Ideas: Analytics, multi-language embeds, role-locked giveaways, prize claim portals
About the Author
Built by SimolZimol — I design and operate community-first tooling with a focus on reliability, clear UX, and practical automation.
Contact & Links
- Email/Discord: (your preferred contact)
- Live Demo: (link if hosted)
- Source Code: (GitHub/website link)
Short Blurb (Copy-Paste)
A production-ready Discord bot by SimolZimol featuring advanced moderation, a restart-safe giveaway engine with Steam integration, and a companion Flask dashboard — built for reliability, clarity, and great community UX.