Hambergo / 9kmmrbot

MIT License
104 stars 29 forks source link

Broken GetRealTimeStats function #45

Closed ciaran closed 4 years ago

ciaran commented 5 years ago

There seem to be a couple of bugs in this function which I think will result in it always catching and returning the Game not found error

https://github.com/Hambergo/9kmmrbot/blob/91eb931907cf11554572bb2bde97206ddf67b96f/lib/steamApi.js#L32 Here .json() is called on the result, but the GetAPI function being used already does this.

https://github.com/Hambergo/9kmmrbot/blob/0218b26de0b82ba8f2d8f90858cdab6b7fba4382/lib/steamApi.js#L49

The server_steam_id value doesn’t seem to be in scope here (probably intended to come from parameters)

Hambergo commented 4 years ago

Thanks! I'll work on a patch