





































Discord bot for a Mobile Legends community server. Members verify their game account, then earn XP and Event Points through chat, voice, quizzes and quests, and staff run events, booster raffles, tickets and moderation from the same data.

MSL Philippines logo
This is the bot for a Mobile Legends: Bang Bang community server tied to Moonton Student Leaders Philippines, where I was National Admin for Partnerships and founded the MSL Network. A server like that has two jobs at once. Members want levels, quizzes and prizes. Staff need to know who is a real player, who is a student leader, and who already got a prize this month.
Before the bot, those answers lived in separate tools and spreadsheets. I wrote one bot that ties them together, so verifying a game account unlocks the rest, and every reward, raffle and report reads from the same MySQL database. It is built for a single server on purpose. The guild ID is a constant, and roles and channels are stored as settings that staff change with setup commands.
Planning for the whole system started on November 2025. It was a full suite of gamification. It had XP, moderation and a boost tracker. A week later it had tiered booster perks, every command converted to slash commands, and settings moved from code into the database so staff could change them without me.
Most of the larger systems landed in a burst around March. Event Points with seasonal ranks, Discord scheduled-event tracking, the quiz, tickets with HTML transcripts, the weekly booster raffle and account verification all arrived within days of each other. The next weeks added the Moonton student leader check, referral codes, confessions and counting channels, daily quests, and an analytics dashboard. April filled in the staff side with event workflows that track attendance automatically and a lot of repair tooling for raffles.

The bot keeps its own analytics, and this chart reads them directly. The numbers refresh once a day.
The server grew from about 5,800 members in March to about 35.8K. Move across the chart to read the count on any day, and open More for the smaller numbers.
Five systems carry most of the weight. Each animation below illustrates how each of them work.
Verification is a form behind one button. The bot checks that the UID and Server are digits and that the UID isn't already tied to another Discord account. A pass grants the Verified role, and from then on the member can earn XP and Event Points. The MSL member check compares the UID and server pair against a the internal database for MSL program members.
Chat, reaction and voice XP go into a dictionary in memory after a quick verified check, so nothing hits the database per message. Every 60 seconds the bot writes the whole dictionary in one transaction and subtracts what it wrote, so XP earned during the write isn't lost. Booster multipliers apply at write time. Event Points are a separate column, earned from quizzes, events and admin grants.
The quiz runs twice a day in its channel. Ten questions get 20 seconds each, and anyone can type the exact answer. Faster answers score more, up to 1,000 per round. The top three players who haven't been paid that day get 150, 100 and 75 Event Points, and other scorers get 50.
The Sunday draw runs at 8 AM Manila time. Verified MSL members are taken out of the pool first. Tickets depend on booster tier and each booster can take one normal slot, with priority for boosters who haven't won this month. Extra slots go to whoever has the fewest extra wins. The CSV export for prizes puts unverified winners last.
Each member gets three quests a day, generated the first time they run the quest command that day. Slot one is always common and slot two uncommon. Slot three rolls across the tiers with weights of 70, 25 and 5. Progress comes from messages, reactions and voice, and rewards are 50, 150 and 500 XP, paid through the normal XP path.
Outside Discord, the repo has a documentation site for staff and members, an analytics dashboard with daily, weekly and monthly active users, and a quest editor, all on Vercel. The Vercel functions read the same MySQL tables the bot writes, so there is no second reporting store. The bot runs on a Pterodactyl panel, and a push to main triggers a restart through a GitHub Action.