mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13:09 +02:00
await
This commit is contained in:
parent
499517d082
commit
96562aa474
@ -136,7 +136,7 @@ class Bot extends Client {
|
|||||||
if (this.config.super_secret_setting) { // you can disable it if you really want
|
if (this.config.super_secret_setting) { // you can disable it if you really want
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
let tickets = await this.db.models.Ticket.count();
|
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',
|
method: 'post',
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
// fail quietly, it doesn't really matter if it didn't work
|
// 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 => {
|
this.guilds.cache.forEach(async g => {
|
||||||
let members = (await g.fetch()).approximateMemberCount;
|
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',
|
method: 'post',
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.log.debug(e);
|
this.log.debug(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user