diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-05 18:03:04 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-05 18:03:04 +0200 |
| commit | a5bd191b194ca97afd777a4bb523981e4855df92 (patch) | |
| tree | 8242a790df39813187b8ba84d5985e90620a0890 /responses.js | |
| parent | 0e5a0b876aa36786430d313f8ded843aa849eb00 (diff) | |
| download | discordbot-a5bd191b194ca97afd777a4bb523981e4855df92.tar.gz discordbot-a5bd191b194ca97afd777a4bb523981e4855df92.zip | |
refactor, fix caching
Diffstat (limited to 'responses.js')
| -rw-r--r-- | responses.js | 9 |
1 files changed, 6 insertions, 3 deletions
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; |
