From b8abf853dbe74da73bf5e0bddb1291c22c4eb6bf Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 3 Feb 2023 04:27:39 +1100 Subject: [PATCH] Provide Axios status when host is unreachable. --- src/client.ts | 2 +- src/index.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index de93ee5..2b7d91a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -82,7 +82,7 @@ export default class TClient extends Client { } async init(){ MPDB.sync(); - this.login(this.tokens.token_main); + this.login(this.tokens.token_beta); this.punishments.initLoad(); this.bannedWords.initLoad(); this.bonkCount.initLoad(); diff --git a/src/index.ts b/src/index.ts index 192ea1d..7849bb0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,6 +85,7 @@ setInterval(async()=>{ await Promise.all([serverData(client, completedURL_DSS), serverData(client, completedURL_CSG)]).then(function(results){ if (typeof results[0] == 'string'){ FSdss.fetchResult = `dag mp dss fail, ${results[0]}`; + embed.addFields({name: 'DSS Status', value: results[0]}) } else if (results[0].status != 200){ FSdss.fetchResult = `dag mp dss fail with ${results[0].status + ' ' + results[0].statusText}`; } else { @@ -92,6 +93,7 @@ setInterval(async()=>{ } if (typeof results[1] == 'string'){ FScsg.fetchResult = `dag mp csg fail, ${results[1]}`; + embed.addFields({name: 'CSG Status', value: results[1]}) } else if (results[1].status != 200){ if (results[1].status == 204){embed.setImage('https://http.cat/204')} FScsg.fetchResult = `dag mp csg fail with ${results[1].status + ' ' + results[1].statusText}`;