Database, cogs, Log in with Discord, and a site that changes your bot's settings live.
The step after your first bot. We build a welcome feature whose channel and message are set from a web page, the same way big bots do it: the bot and the website share one database, the website logs people in with Discord, and only people who manage a server can change it. Python all the way (discord.py and Flask). Finish the free bot course first, or know what a slash command is.
By Dispresso
Playing as a guest. Level 1 is yours to try. Sign in to save XP, keep a streak and earn the badge.
Sign in to saveLevel 1 of 6
About 5 minutes
Here's the trick nobody tells you: the website and the bot don't talk to each other. They both talk to the same database. The site writes a setting, the bot reads it the next time it needs it. No sockets, no magic.
The project ends up looking like this:
mybot/
.env # tokens and secrets, never in git
db.py # every database read and write
bot.py # starts the bot, loads cogs
cogs/
welcome.py # the welcome feature
web.py # the Flask dashboard
templates/
servers.html
server.html
data.db # made for you on first runpython -m pip install -U discord.py python-dotenv flask requestsTwo processes, one database. That's the whole architecture. When something breaks later, ask "which side wrote it and which side read it" and you'll find the bug twice as fast.
Boss question