Ask coding questions

← Back to all posts
Python Discord Bot
Smart0ne

https://www.youtube.com/watch?v=SPTfmiYiuok

In the video I posted above, they show people how to make a discord bot. They also show how to make settings for the bot using the replit database.

If the bot is in multiple servers, how would this. settings feature be implemented?

Another question: If there is a stat for the users (like maybe how much money the user has), how would that be implemented?

Voters
Smart0ne
Comments
hotnewtop
ObiVibKenobi

Maybe you could try writing the settings of a server to a database, with the key as the server ID, and the value as a dictionary of the settings?

For example:

Where 1234567890 is the server ID.

If someone does !ban, then you can do

I don’t really use discord.py, but you could put ban code in if it’s yes, and something like that if its no. Obviously replace the message.guild.id with correct stuff