The official Discord bot for the BERNICS ESPORTS community. A complete tournament manager + ticket support system, available in two implementations β pick whichever you prefer.
- π Full tournament workflow β control panel, auto channels, registration, slot manager, groups
- π Auto team registration with format validation, duplicate guard, slot overflow guard
- π Schedule + IDP system with Room ID / Password broadcasts
- π Live point table (points / kills / wins, sorted leaderboard)
- π’ Multi-line modals for announcements, captain DMs, custom embeds, and member greetings (banner image, footer GIF, role filter,
{user}{name}{server}placeholders) - π Auto-welcome on member join
- π Server / user / avatar / poll utilities
- π‘οΈ Moderation: ban / kick / mute / unmute / purge
- π Giveaway system with one-click button entry and automatic winner picking
- π« Ticket support system β private channels with Claim + Close buttons, staff role permissions
- π
/helpshows everything in-Discord
Bot prefix:
?Β· Status: Do Not Disturb Β· Activity: Organising Tournaments in BRN ESPORTS Β· Description: BRN ESPORTS OFFICIAL BOT
-
A Discord account and a server where you have Administrator permission.
-
A bot application at discord.com/developers/applications.
-
Enable all 3 Privileged Gateway Intents for your bot:
- PRESENCE INTENT
- SERVER MEMBERS INTENT
- MESSAGE CONTENT INTENT
-
Invite the bot with Administrator permission (or at minimum: Manage Channels, Manage Roles, Manage Messages, Kick / Ban Members, Moderate Members, Send Messages, Embed Links, Add Reactions, Read Message History).
-
Set this single environment variable:
DISCORD_BOT_TOKEN=your-bot-token-here
β οΈ Don't run both versions at the same time with the same token β Discord allows only one active gateway session per bot.
Requires Python 3.11+
# Clone
git clone https://github.com/<your-username>/brn-esports-bot.git
cd brn-esports-bot/bot
# Install
pip install discord.py
# Configure
export DISCORD_BOT_TOKEN="your-bot-token-here" # macOS/Linux
# setx DISCORD_BOT_TOKEN "your-bot-token-here" # Windows (re-open terminal after)
# Run
python main.pyProject layout:
bot/
βββ main.py # entrypoint, intents, command sync
βββ state.py # JSON persistence
βββ data/state.json # auto-created
βββ cogs/
βββ tournament.py # ?t panel + buttons + modals
βββ registration.py # auto team registration listener
βββ slot_manager.py # slot list / cancel / reset
βββ moderation.py # ban/kick/mute/unmute
βββ purge.py # ?purge
βββ giveaway.py # ?gstart + winner picker loop
βββ ticket.py # /ticketsetup + Open / Claim / Close buttons
βββ management.py # everything else (announce, schedule, points, welcome, helpβ¦)
Requires Node.js 20+
# Clone
git clone https://github.com/<your-username>/brn-esports-bot.git
cd brn-esports-bot/bot-js
# Install
npm install
# Configure
export DISCORD_BOT_TOKEN="your-bot-token-here" # macOS/Linux
# setx DISCORD_BOT_TOKEN "your-bot-token-here" # Windows (re-open terminal after)
# Run
npm startProject layout:
bot-js/
βββ package.json
βββ index.js # entrypoint, intents, command sync
βββ constants.js # colors, channel names, parsers
βββ state.js # JSON persistence
βββ data/state.json # auto-created
βββ commands/
β βββ definitions.js # all slash command definitions
β βββ slash.js # slash command handlers
β βββ prefix.js # ?t Β· ?purge Β· ?gstart
β βββ interactions.js # buttons + modals
β βββ tickets.js # ticket panel + claim / close
βββ events/
βββ registration.js # auto team registration listener
βββ giveaway.js # winner picker loop
βββ welcome.js # auto-welcome on member join
- The bot comes online (status: DND, activity: Organising Tournaments in BRN ESPORTS).
- All slash commands appear in your server instantly (per-guild sync β no 1-hour wait).
- Type
?tβ Tournament Control Panel appears with action buttons. - Create Tournament β set name, team size, total slots.
- Create Channels β 11 styled channels are created with the registration format auto-posted.
- Members register by posting the format in
#βΝΝΝ-⨳γ’registrationβ confirmed teams appear in#βΝΝΝ-⨳γ’confirm-teams. - Use
/ticketsetupto set up the support ticket panel. - Use
/addmatch+/idpfor matches,/setpointsfor the leaderboard,/announcefor updates.
A polished, BERNICS-branded ticket flow.
Setup (admin runs once):
/ticketsetup staff_role:@Moderator category:π« Tickets channel:#support
Posts a panel that looks like:
BERNICS ESPORTS β’ Support π« Need Help? Open a Ticket Welcome to support! Click the button below to open a private ticket with our staff team.
How it works βΊ A private channel is created just for you βΊ Only you and staff can see it βΊ Describe your issue and we'll help ASAP βΊ Close the ticket when you're done
Please don't open a ticket without a real reason β abuse may result in action.
Powered by your friendly support team
What happens next:
| Action | Result |
|---|---|
| Member clicks π« Open Ticket | A private channel ticket-####-username is created under the configured category. Only the user, the configured staff role, and admins (Manage Channels) can see it. |
| Staff clicks π Claim | The ticket header updates: π‘ Open β’ Claimed by @Moderator. |
| Staff or opener clicks π Close | A "closing in 5 seconds" notice is posted, then the channel is deleted. |
| One ticket per user | If the user already has an open ticket, the bot points them to it instead of creating a duplicate. |
Slash commands:
| Command | Purpose |
|---|---|
/ticketsetup [staff_role] [category] [channel] |
Configure + post the panel |
/ticketpanel |
Re-post the panel in the current channel |
/ticketclose |
Close the current ticket (works inside any ticket channel) |
| Command | Description |
|---|---|
?t |
Open the Tournament Control Panel |
/info |
Show tournament info (name, slots, status, groups) |
/settournamentname <name> |
Rename the tournament |
/setslots <n> |
Set total slots |
/setteamsize <n> |
Set players per team |
/endtournament |
End and reset the tournament |
| Command | Description |
|---|---|
/teamlist |
List confirmed teams |
/removeteam <team> |
Remove a team by name |
/lineup |
Show group lineup |
| Command | Description |
|---|---|
/addmatch <match_no> <team_a> [team_b] [time] [room_id] [room_pass] |
Add or update a match |
/removematch <match_no> |
Remove a match |
/schedule |
Show match schedule |
/idp <match_no> <room_id> <room_pass> |
Broadcast Room ID + Password |
| Command | Description |
|---|---|
/setpoints <team> <points> [kills] [wins] |
Set points for a team |
/addpoints <team> [points] [kills] [wins] |
Add to team points |
/resetpoints |
Reset point table |
/points |
Show point table (sorted) |
| Command | Description |
|---|---|
/announce [ping_everyone] [image_url] |
Multi-line announcement embed |
/dmcaptains |
DM all team captains a message |
/greet [image_url] [footer_gif] [role] |
DM all members (or one role) a welcome embed |
/sayembed [color_hex] [image_url] [thumbnail_url] [footer_icon_url] |
Build a fully custom embed |
/poll <question> [option1..option5] |
Quick poll with up to 5 reaction options |
| Command | Description |
|---|---|
/setwelcome <#channel> <message> [image_url] |
Auto-greet new members. Placeholders: {user} {name} {server} |
/welcomeoff |
Disable auto-welcome |
| Command | Description |
|---|---|
/serverinfo |
Server stats |
/userinfo [user] |
User stats |
/avatar [user] |
Show user's avatar |
| Command | Description |
|---|---|
/ban <user> [reason] |
Ban a user |
/kick <user> [reason] |
Kick a user |
/mute <user> <time> [reason] |
Timeout (10m, 2h, 1d, max 28 days) |
/unmute <user> |
Remove timeout |
?purge <1-100> |
Delete N messages |
?purge @user |
Delete that user's last 100 messages |
| Command | Description |
|---|---|
?gstart <time> <prize> <Nwinner> |
Start a giveaway. Example: ?gstart 10m Nitro 1winner |
| Command | Description |
|---|---|
/ticketsetup [staff_role] [category] [channel] |
Configure + post the support panel |
/ticketpanel |
Re-post the panel here |
/ticketclose |
Close the current ticket |
| Command | Description |
|---|---|
/help |
Pretty in-Discord guide of every command |
Each implementation persists everything to a single JSON file inside its own folder:
- Python β
bot/data/state.json - JavaScript β
bot-js/data/state.json
This keeps deployment dead simple β no database required. To reset everything for a guild, stop the bot and delete that file.
| Problem | Fix |
|---|---|
| Slash commands don't appear | Make sure the bot has the applications.commands scope and was invited fresh after that change. The bot syncs per-guild on ready so new guilds get commands instantly. |
MESSAGE CONTENT INTENT errors |
Enable all 3 privileged intents in the Discord Developer Portal. |
| Tickets / channels can't be created | Bot needs Manage Channels permission. Admin role works best. |
| Greet / DM Captains says "0 sent" | Members have DMs disabled, or you filtered to a role nobody has. |
MIT β do whatever you want, just keep the credit.