ass-a-service / ajobot

More ajos!
MIT License
9 stars 3 forks source link

Save user id instead #25

Closed fabri2000779 closed 2 years ago

fabri2000779 commented 2 years ago

Right now we save username like fabri2000779#3306 but in discord you can change # if you pay. This cause if a user gets Discord Nitro and change his # then he will lost all his ajos.

The solution for this is save the discord user id that never changes

axl89 commented 2 years ago

I can think of two options

Option 1

127.0.0.1:6379> zrange lb 0 -1 withscores
 1) "pepahell#2102"
 2) "0"
 3) "Ajo bot#9944"
 4) "1"
...

to:

127.0.0.1:6379> zrange lb 0 -1 withscores
 1) 458641181818
 2) "0"
 3) 48412418232
 4) "1"
...

The conns I can think of:

Option 2

We could implement a new command (e.g. /updateusername) where the key is updated with the new user name.

Zymna commented 2 years ago

Fixed with #26