-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fighters with "&" in name render SaltBot unable to record data or bet #477
Comments
Appending an update/another example encountered earlier: This time, a fighter with a comma "," in their name broke the bot for several minutes, the bot listed the comma as an underscore "_" in the F12 console, and after missing several matches finally determined something went wrong. Photo examples supplied here at https://imgur.com/a/AtQnVYl will show what the F12 console translated as the fighter name vs. the actual name displayed in Twitch chat for that match.
|
First, the reason you are seeing an underscore instead of a comma is because of this code here: saltbot stores 12 variables for every match in matchrecords in a specific format: I reviewed the records of several characters containing the character Disclaimer: I am unfamiliar with JS/TS, don't know what JQuery is, etc. I will gather some data on this. Regardless, we will eventually need to sanitize character names going forward to prevent any related issues from occurring. I'm still understanding how names are processed, as there are several different methods it uses to pull character names or reference them. |
That all makes sense to me, even as a mere user who can only report what he sees. Great info. For clarity for other folks, like I alluded to further up, I can confirm that all other characters inside fighter names besides Knowing what was just explained by zappybiby, this leads me to suspect that since the bot is translating commas into underscores and it's of course logging those fighter records using underscores in their names as well... There was some sort of snag when the RESULTS of that example match I provided were reported in Twitch chat. Perhaps the bot failed/fails to translate commas in the process of reading Match Result data or something. Truth be told I thought I remembered fighters with |
This is a constant, always replicable on my end, issue the bot has had for as long as I've used it, older versions and current.
If a fighter has the "&" symbol in their name, the bot will make the bet using whatever data it has on the fighters, and then cease to function until both the chat tab and Salty Bet site tab have been refreshed.
This refresh can be done manually, or be triggered by the auto-refresh the tabs do to themselves after about 100 matches (purely a personal estimate).
This means that the results of the bet are never logged, and furthermore it appears as though the bot proceeds to just log the unresolved bet as a null-win, resulting in characters with "&" in their name effectively being read as characters who have never won any of their most recent 15 matches, and only ever lost.
I seem to remember that this used to happen with other non-alphanumeric symbols in fighter names as well (such as "." and "_" ) but as of late I've personally only ever observed and verified it happen with "&" in the fighter name.
Two photo examples, taken within minutes of each other during a tournament in which a fighter fitting the criteria for this issue won their match, are supplied here at https://imgur.com/a/T2Soi5A to show what might be seen in the F12 console.
The text was updated successfully, but these errors were encountered: