Files
bot.py
README.md
requirements.txt
Code
3 755
bot.py
import discord
from discord.ext import commands
from discord import app_commands
import os
import asyncio
from dotenv import load_dotenv
import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
load_dotenv()
intents = discord.Intents.all()
bot = commands.Bot(command_prefix="!", intents=intents)
# โโ Server structure blueprint โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SERVER_STRUCTURE = {
"๐ช FESTIVAL STAGE": {
"type": "category",
"channels": {
"๐ชโserver-banner": {"type": "text", "topic": "Welcome to Festival Stage โ the ultimate gaming experience."},
"๐ขโannouncements": {"type": "text", "topic": "Official server announcements. Stay tuned!"},
"๐๏ธโevents": {"type": "text", "topic": "Upcoming events, tournaments and giveaways."},
"๐โupdates": {"type": "text", "topic": "Game patches, bot updates and server changes."},
"๐ณ๏ธโpolls": {"type": "text", "topic": "Community polls. Vote and shape the server!"},
}
},
"๐ INFORMATION": {
"type": "category",
"channels": {
"๐โwelcome": {"type": "text", "topic": "Welcome to Festival Stage! Read before anything."},
"๐โrules": {"type": "text", "topic": "Server rules โ read carefully or face the ban hammer."},
"๐ญโroles-info": {"type": "text", "topic": "Learn about all roles and how to earn them."},
"โโfaq": {"type": "text", "topic": "Frequently asked questions answered here."},
"๐คโpartnerships": {"type": "text", "topic": "Our official partners and affiliates."},
}
},
"๐ฌ GENERAL": {
"type": "category",
"channels": {
"๐ฌโgeneral-chat": {"type": "text", "topic": "Main hangout โ talk about anything."},
"๐โmemes": {"type": "text", "topic": "Post your best memes here!"},
"๐ธโmedia": {"type": "text", "topic": "Share screenshots, clips and art."},
"๐ตโmusic-chat": {"type": "text", "topic": "Talk about music, share tracks."},
"๐คโbot-commands": {"type": "text", "topic": "Use bot commands here only, not in main chat."},
"๐โintroductions": {"type": "text", "topic": "Introduce yourself to the community!"},
}
},
"๐ฎ GAMING ZONE": {
"type": "category",
"channels": {
"๐ฎโgaming-chat": {"type": "text", "topic": "All gaming discussions go here."},
"๐โlooking-for-game": {"type": "text", "topic": "LFG โ find teammates and squads."},
"๐โtournaments": {"type": "text", "topic": "Tournament registrations, brackets and results."},
"๐โleaderboards": {"type": "text", "topic": "Top players and rankings."},
"๐ฏโclips-highlights": {"type": "text", "topic": "Share your best plays and clips!"},
"๐โtrading": {"type": "text", "topic": "In-game trading and item exchange."},
}
},
"๐ช FESTIVAL STAGE GAME": {
"type": "category",
"channels": {
"๐ชโfs-general": {"type": "text", "topic": "Festival Stage game discussions."},
"๐โfs-guides": {"type": "text", "topic": "Strategy guides and tutorials."},
"๐โfs-bug-reports": {"type": "text", "topic": "Report in-game bugs here."},
"๐กโfs-suggestions": {"type": "text", "topic": "Suggest new features and improvements."},
"๐
โfs-achievements": {"type": "text", "topic": "Show off your in-game achievements!"},
}
},
"๐ VIP LOUNGE": {
"type": "category",
"channels": {
"๐โvip-chat": {"type": "text", "topic": "Exclusive VIP members only. Premium conversations."},
"๐โvip-media": {"type": "text", "topic": "VIP-only media sharing channel."},
"๐โvip-giveaways": {"type": "text", "topic": "Exclusive giveaways for VIP members."},
"๐โvip-early-access": {"type": "text", "topic": "Early access to events and content โ VIP only."},
}
},
"๐ค STAGE VOICE": {
"type": "category",
"channels": {
"๐ช Festival Main Stage": {"type": "voice", "limit": 0},
"๐ฎ Gaming Arena 1": {"type": "voice", "limit": 10},
"๐ฎ Gaming Arena 2": {"type": "voice", "limit": 10},
"๐ฎ Gaming Arena 3": {"type": "voice", "limit": 10},
"๐ Tournament Hall": {"type": "voice", "limit": 20},
"๐ก Stream Watch Party": {"type": "voice", "limit": 50},
"๐ต Music Lounge": {"type": "voice", "limit": 15},
"๐ฌ Chill Zone": {"type": "voice", "limit": 8},
"๐คซ Private Room 1": {"type": "voice", "limit": 5},
"๐คซ Private Room 2": {"type": "voice", "limit": 5},
}
},
"๐ VIP VOICE": {
"type": "category",
"channels": {
"๐ VIP Lounge": {"type": "voice", "limit": 0},
"๐ VIP Gaming Suite": {"type": "voice", "limit": 10},
"๐ช VIP Stage": {"type": "voice", "limit": 20},
}
},
"๐ ๏ธ STAFF ONLY": {
"type": "category",
"channels": {
"๐โstaff-chat": {"type": "text", "topic": "Staff only โ keep it professional."},
"๐จโmod-logs": {"type": "text", "topic": "Moderation action logs."},
"๐โban-list": {"type": "text", "topic": "Active bans and punishments log."},
"๐ฎ Staff Room": {"type": "voice", "limit": 0},
}
},
"๐ซ SUPPORT": {
"type": "category",
"channels": {
"๐ซโopen-ticket": {"type": "text", "topic": "React to open a support ticket."},
"๐ฌโreport-user": {"type": "text", "topic": "Report a rule-breaker here with evidence."},
}
},
}
ROLES = [
{"name": "๐ Owner", "color": discord.Color.from_rgb(255, 215, 0), "hoist": True, "mentionable": False},
{"name": "โ๏ธ Co-Owner", "color": discord.Color.from_rgb(255, 140, 0), "hoist": True, "mentionable": False},
{"name": "๐ก๏ธ Admin", "color": discord.Color.from_rgb(220, 20, 60), "hoist": True, "mentionable": True},
{"name": "๐จ Moderator", "color": discord.Color.from_rgb(255, 69, 0), "hoist": True, "mentionable": True},
{"name": "๐ Trial Mod", "color": discord.Color.from_rgb(255, 165, 0), "hoist": True, "mentionable": True},
{"name": "๐ VIP+", "color": discord.Color.from_rgb(180, 0, 255), "hoist": True, "mentionable": False},
{"name": "๐ VIP", "color": discord.Color.from_rgb(130, 0, 200), "hoist": True, "mentionable": False},
{"name": "๐ช Festival Star", "color": discord.Color.from_rgb(0, 200, 255), "hoist": True, "mentionable": False},
{"name": "๐ Champion", "color": discord.Color.from_rgb(0, 180, 100), "hoist": True, "mentionable": False},
{"name": "โก Elite", "color": discord.Color.from_rgb(50, 150, 255), "hoist": True, "mentionable": False},
{"name": "๐ฎ Gamer", "color": discord.Color.from_rgb(100, 100, 255), "hoist": False, "mentionable": False},
{"name": "๐ฑ Member", "color": discord.Color.from_rgb(100, 200, 100), "hoist": False, "mentionable": False},
{"name": "๐ญ Event Crew", "color": discord.Color.from_rgb(255, 100, 200), "hoist": False, "mentionable": True},
{"name": "๐ค Bot", "color": discord.Color.from_rgb(50, 50, 50), "hoist": False, "mentionable": False},
{"name": "๐๏ธ Verified", "color": discord.Color.from_rgb(80, 200, 120), "hoist": False, "mentionable": False},
]
# โโ Embed builders โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def rules_embed():
e = discord.Embed(
title="๐ FESTIVAL STAGE โ SERVER RULES",
description=(
"Breaking any rule will result in **warnings, mutes, kicks, or permanent bans**.\n"
"Ignorance of the rules is **not** an excuse. Read carefully.\n\u200b"
),
color=discord.Color.from_rgb(220, 20, 60)
)
rules = [
("1๏ธโฃ Respect Everyone",
"No racism, homophobia, sexism, or any form of discrimination. Treat every member with respect regardless of background."),
("2๏ธโฃ No Harassment or Bullying",
"Any form of targeted harassment, hate speech, or bullying will result in an **instant permanent ban**."),
("3๏ธโฃ No Spam or Flooding",
"No repeated messages, excessive caps, emoji spam, or character flooding in any channel."),
("4๏ธโฃ No NSFW Content",
"Absolutely no NSFW, gory, or disturbing content anywhere on the server."),
("5๏ธโฃ No Self-Promotion or Advertising",
"Do not advertise other servers, YouTube, Twitch, social media, or products without **staff approval**."),
("6๏ธโฃ No Cheating or Exploiting",
"Discussing or promoting cheats, hacks, or exploits for any game is **strictly forbidden**."),
("7๏ธโฃ English Only in Main Channels",
"Please keep conversations in English in public channels so staff can moderate effectively."),
("8๏ธโฃ No Impersonation",
"Do not impersonate staff, other members, or public figures. This leads to an **instant ban**."),
("9๏ธโฃ No Illegal Content",
"Sharing pirated software, malware, illegal content, or doxxing information is an **automatic permanent ban**."),
("๐ Follow Discord ToS",
"All members must follow [Discord's Terms of Service](https://discord.com/terms) and [Community Guidelines](https://discord.com/guidelines)."),
("โ ๏ธ Staff Decisions Are Final",
"Do not argue with staff in public channels. If you believe a decision was unfair, open a support ticket."),
("๐ซ Appeals",
"If you were banned or muted unfairly, open a ticket in <#ticket-channel>. Do not DM staff directly."),
]
for name, val in rules:
e.add_field(name=name, value=val, inline=False)
e.set_footer(text="Festival Stage โข Rules last updated by server staff")
return e
def welcome_embed(guild: discord.Guild):
e = discord.Embed(
title=f"๐ช WELCOME TO {guild.name.upper()}",
description=(
"**The ultimate premium gaming community.**\n\n"
"๐ฎ Compete, grow, and dominate with the best players.\n"
"๐ Join tournaments and climb the leaderboards.\n"
"๐ Unlock VIP perks for an exclusive experience.\n"
"๐ช Attend live events on the Festival Stage.\n\n"
"**Get started:**\n"
"```\n"
"โ Read #rules carefully\n"
"โก Check #roles-info to grab your roles\n"
"โข Introduce yourself in #introductions\n"
"โฃ Jump into #general-chat and say hi!\n"
"```"
),
color=discord.Color.from_rgb(255, 215, 0)