Karitham / WaifuBot

discord waifu / husbando gacha bot
MIT License
38 stars 11 forks source link

[Feature Request] - Lost characters #50

Closed Ziloxeur closed 3 years ago

Ziloxeur commented 3 years ago

Is your feature request related to a problem? Please describe. Someone gaves me a character already in my list and when I checked it, he was neither in mine and his.

Describe the solution you'd like I would like to be able to stack duplicate character gained in trade.

Describe alternatives you've considered - optional Gimme back my lost character :'(

BellezaEmporium commented 3 years ago

It would mean verifying if the user has already got it, if the user has got it then the give is blocked. If it's not, then it's good to go.

Just reuse the "verify" function you implemented and place it before the DB rewrite. in the "give" function.

To answer, i'm not sure at all if "stacking Waifus" is really a great idea. It might break the database.

Karitham commented 3 years ago

There is no issue to having multiple time the same character as it is just stored as a mongo array,

I'll look deeper into the code, but as I see it there shouldn't be an issue like this with the current code, I may work more on this if it reiterates