diff options
Diffstat (limited to 'responses.js')
| -rw-r--r-- | responses.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/responses.js b/responses.js index 582e85d..f4209fd 100644 --- a/responses.js +++ b/responses.js @@ -260,7 +260,7 @@ module.exports.showUser = async (msg, args) => { const waiter = api.subscribeUpdates(ign); while (await waiter.next() != undefined) { - const [player, stormcallerpleasefix] = await Promise.all([ + const [player, matches] = await Promise.all([ api.getPlayer(ign), api.getMatches(ign) ]); @@ -269,12 +269,11 @@ module.exports.showUser = async (msg, args) => { "Loading your data…", response); continue; } - if (stormcallerpleasefix == undefined || stormcallerpleasefix[0].data.length == 0) { + if (matches == undefined || matches.data.length == 0) { response = await respond(msg, "No match history for you yet", response); continue; } - const matches = stormcallerpleasefix[0]; const moreHelp = oneLine` *${emoji.symbols.information_source} or ${usg(msg, "vm " + ign)} for detail, |
