LorittaBot / Loritta

💁 A multipurpose, multilanguage, customizable, modular, and very cute bot for Discord! ~Making your server more awesome~
https://loritta.website/
GNU Affero General Public License v3.0
670 stars 170 forks source link

Add "Daily Tax" microservice #2507

Closed MrPowerGamerBR closed 2 years ago

MrPowerGamerBR commented 2 years ago

I'm still thinking of how to handle the DMs notifications about the daily tax.

Maybe I could use a message queue that the microservice asks any replica of the :discord:commands module to send, but I think that's gonna make the code more complex for no reason. This would also have the advantage of sending DMs even if the process goes down, because it would be persisted in PostgreSQL.

I could send the message with Kord in the microservice itself, but then we would use the entirety of Kord in the module for (also) no reason, but it wouldn't make the code more complex.

There is also the concern of Discord thinking that we are spamming users, however I've read that Discord disabled the spam verification for verified bots because MEE6 was always getting banned due to spam.

MrPowerGamerBR commented 2 years ago

Because I also want the user to be notified about the daily tax when using slash commands with ephemeral messages (because what if the user doesn't has DMs open?), the state would need to be stored in the database anyway.