Wager Map Count

Is it possible to have a command that can be implemented either through API’s or generic code that would make it possible to do the below?

Brief example:

Lets say people are doing a wager in warzone in a 2v2 format and we have teams A and B doing a best of 3 format.

Team A win map one and would go 1-0 up in the wager, and could be like !wagerwin A so that !mc would state 1-0 | BO3

Team B win map two and would go 1-1 in the wager, and so !wagerwin B would make it 1-1 | BO3 for !mc

Team B win map three and go 1-2 in the wager, so !wagerwin B would make it 1-2 | BO3 - Team B wins. (based on the API/code reading the BO3 and calculating it so that whenever one team hits half of the best of number +0.5 will be stated as winning.)

Not sure if this is possible to do but just wanted to see if someone with more coding knowledge had an idea of how to do it.

You can repurpose the following command:

`!gw` would become team A’s win, and `!gl` team B’s win.

If you edit the previously-named `!gulag` command as such, it should do the job:
``````\$(eval q = `\$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)`; w = q.match(/w\d+/g); l = q.match(/l\d+/g); w === null ? w = 0 : w = w.pop().replace(`w`, ``); l === null ? l = 0 : l = l.pop().replace(`l`, ``); w === 3 ? `Team A won \${w} - \${l}!` : l === 3 ? `Team B won \${l} - \${w}!` : `Team A: \${w} | Team B: \${l}`;)