From a5bd191b194ca97afd777a4bb523981e4855df92 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 5 May 2017 18:03:04 +0200 Subject: refactor, fix caching --- responses.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'responses.js') diff --git a/responses.js b/responses.js index ef749eb..a2eb83d 100644 --- a/responses.js +++ b/responses.js @@ -141,7 +141,8 @@ module.exports.showUser = async (msg, args) => { } } - const waiter = await api.subscribeUpdates(ign, true); + const waiter = api.subscribeUpdates(ign); + await api.upsearchPlayer(ign); do { const [player, matches] = await Promise.all([ api.getPlayer(ign), @@ -220,7 +221,8 @@ module.exports.showMatch = async (msg, args) => { } } - const waiter = await api.subscribeUpdates(ign, true); + const waiter = await api.subscribeUpdates(ign); + await api.upsearchPlayer(ign); do { const matches = await api.getMatches(ign); if (index > matches.length) { @@ -293,7 +295,8 @@ module.exports.showMatches = async (msg, args) => { } } - const waiter = await api.subscribeUpdates(ign, true); + const waiter = await api.subscribeUpdates(ign); + await api.upsearchPlayer(ign); do { response = await respondMatches(msg, ign, response); responded = true; -- cgit v1.3.1