Problem with bot handling a points system

Since you’re opening an IRC connection and requesting the “twitch.tv/membership” capability, is there any reason you’re making an undocumented API call (I don’t recall seeing it documented, anyway) to get the list of users in chat instead of tracking JOIN/PART events?

Granted, those events don’t give you Twitch user IDs, but what I do is build a list of login names as users join and do a batch /helix/users query every 5 seconds with login names that have joined since the last time that query was run. You also get user IDs in the message tags for PRIVMSG events, which you’ll sometimes see before you see the JOIN event for a user.

As for the database backend, I’m currently using MySQL. Last I checked, SQLite has to lock the entire database file when committing changes (one reason why transactions make such a big difference), while locking in a client/server database engine can be more granular.