diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-13 23:36:18 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-13 23:36:18 +0200 |
| commit | 6b6a97038a679eaa90ffd2430ff2d8b837a95338 (patch) | |
| tree | 46ae4a0bb928d24b0027fb5a8adb9d6a5b9262a2 /responses.js | |
| parent | b8ef09d6be33622bc6131802a80520c57ed1ea20 (diff) | |
| download | discordbot-6b6a97038a679eaa90ffd2430ff2d8b837a95338.tar.gz discordbot-6b6a97038a679eaa90ffd2430ff2d8b837a95338.zip | |
backport API change from 2.3.1
This reverts commit 6b991150f4d8439f58da6eae32458c529a682029.
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, |
