THEWHITEBOY503 / ConnMudaeClone

This bot is an open-source Discord card game, similar to Mudae. It allows you to draw a card every X hours (default 6), and even trade cards with your friends.
MIT License
5 stars 2 forks source link

Make bot work cross-server #20

Closed THEWHITEBOY503 closed 1 year ago

THEWHITEBOY503 commented 1 year ago

Right now, PulaCard works with one database, so all the cards carry over to all servers. By adding a server ID to database entries for card draws and the card DB, the bot could be made to work across different servers.

So, when a card is drawn, it gets assigned the server ID for the server in which it was drawn. When a user goes to view their card, the bot makes an SQL query to show all cards where user ID = (the user's ID) AND server ID = (the server's ID)

Cooldowns are already defined by server, so changing the cooldown system isn't needed (other than fixing existing bugs)

THEWHITEBOY503 commented 1 year ago

Code written. Awaiting push to main and bot.

THEWHITEBOY503 commented 1 year ago

See commit #99887fb.