summaryrefslogtreecommitdiff
path: root/responses.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-05 18:03:04 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-05 18:03:04 +0200
commita5bd191b194ca97afd777a4bb523981e4855df92 (patch)
tree8242a790df39813187b8ba84d5985e90620a0890 /responses.js
parent0e5a0b876aa36786430d313f8ded843aa849eb00 (diff)
downloaddiscordbot-a5bd191b194ca97afd777a4bb523981e4855df92.tar.gz
discordbot-a5bd191b194ca97afd777a4bb523981e4855df92.zip
refactor, fix caching
Diffstat (limited to 'responses.js')
-rw-r--r--responses.js9
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;