pattyjogal / cypher-bot

A Discord bot for the EntryFrag Valorant Server
0 stars 0 forks source link

Prevent Multiple Registrations Of A Single User #2

Closed JoshSanch closed 2 years ago

JoshSanch commented 3 years ago

Ran into an instance on 9/16/21 of a user using /register new instead of /register update on accident.

This resulted in the following behavior: User had two different associated tag/pronoun pairs in the bot MongoDB database. Joining a Ten Mans queue using /tenmans join resulted in having two tags added to the queue. Leaving that queue using /tenmans leave resulted in only a single tag being removed from the queue. The user was unable to remove their remaining tag using subsequent calls to /tenmans leave.

This is an undesired behavior, and users should be prevented from using /register new once they've already registered.

pattyjogal commented 2 years ago

I saw this again today, so I have to re-open

JoshSanch commented 2 years ago

Weird, yeah I manually fixed but I'll revisit this bug and add another PR for a fix. Probably didn't add logic to the buttons since that was going in around the same time we addressed this.