From 96562aa4741404f7ca17e4a30669b1fd2e0abd4f Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 4 Mar 2021 15:39:22 +0000 Subject: [PATCH] await --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 4a594c6..55a3588 100644 --- a/src/index.js +++ b/src/index.js @@ -136,7 +136,7 @@ class Bot extends Client { if (this.config.super_secret_setting) { // you can disable it if you really want const fetch = require('node-fetch'); let tickets = await this.db.models.Ticket.count(); - fetch(`https://stats.discordtickets.app/client?id=${this.user.id}&tickets=${tickets}`, { + await fetch(`https://stats.discordtickets.app/client?id=${this.user.id}&tickets=${tickets}`, { method: 'post', }).catch(e => { // fail quietly, it doesn't really matter if it didn't work @@ -144,7 +144,7 @@ class Bot extends Client { }); this.guilds.cache.forEach(async g => { let members = (await g.fetch()).approximateMemberCount; - fetch(`https://stats.discordtickets.app/guild?id=${g.id}&members=${members}`, { + await fetch(`https://stats.discordtickets.app/guild?id=${g.id}&members=${members}`, { method: 'post', }).catch(e => { this.log.debug(e);