Closed natesinger closed 1 year ago
Got this message, possibly related:
I recently received notification that Hack-A-Bit's Discord server was running, and I wanted to participate in the server. During the introduction of entering the server, it requires competitors to interact with the bot "Bit" to receive competitor status in the server. Since being a competitor, I decided to complete the necessary steps for registration, using, and completing the commands. Afterward, I got an access token but wasn't able to use it immediately because of an outside event that occurred. When I had the time to use the access code, this message appeared, "attempted registration with an expired token, please generate a new token and try again." I decided to use the !register and !register get-token
commands again, however, after the second command, the process stopped and ended there. I was hoping to contact Hack-A-Bit to help figure this problem out. Below I have attached an image of what happened:
It may be that the database still has the record of the first issued token? I don't know how the database works but I haven't found anything in the python code that would remove an expired token
@Valkerse That's a good catch, that logic doesn't exist. We can write this into the db with pure mysql or using a python worker. Maybe it's pulling all the records and because it only fetches on it fetches a stale token. It looks like his issue is not even receiving the token, however.
@Valkerse As we discussed and you identified, the error originated from a connector timeout. The fix was to check the connector status prior to making the query, and if the connector is dead, to re-instantiate it.
https://github.com/Shift-Cyber/Bits/pull/19/commits/f43642ebdf136ab13f28d9083b985553a5cfa6c3
The bot is currently throwing an error in the registration cog's "on_member_join." No idea why this is happening yet, see the log.