mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Provide Axios status when host is unreachable.
This commit is contained in:
parent
c93d27c79f
commit
fdc1cdbf7b
@ -82,7 +82,7 @@ export default class TClient extends Client {
|
|||||||
}
|
}
|
||||||
async init(){
|
async init(){
|
||||||
MPDB.sync();
|
MPDB.sync();
|
||||||
this.login(this.tokens.token_main);
|
this.login(this.tokens.token_beta);
|
||||||
this.punishments.initLoad();
|
this.punishments.initLoad();
|
||||||
this.bannedWords.initLoad();
|
this.bannedWords.initLoad();
|
||||||
this.bonkCount.initLoad();
|
this.bonkCount.initLoad();
|
||||||
|
@ -85,6 +85,7 @@ setInterval(async()=>{
|
|||||||
await Promise.all([serverData(client, completedURL_DSS), serverData(client, completedURL_CSG)]).then(function(results){
|
await Promise.all([serverData(client, completedURL_DSS), serverData(client, completedURL_CSG)]).then(function(results){
|
||||||
if (typeof results[0] == 'string'){
|
if (typeof results[0] == 'string'){
|
||||||
FSdss.fetchResult = `dag mp dss fail, ${results[0]}`;
|
FSdss.fetchResult = `dag mp dss fail, ${results[0]}`;
|
||||||
|
embed.addFields({name: 'DSS Status', value: results[0]})
|
||||||
} else if (results[0].status != 200){
|
} else if (results[0].status != 200){
|
||||||
FSdss.fetchResult = `dag mp dss fail with ${results[0].status + ' ' + results[0].statusText}`;
|
FSdss.fetchResult = `dag mp dss fail with ${results[0].status + ' ' + results[0].statusText}`;
|
||||||
} else {
|
} else {
|
||||||
@ -92,6 +93,7 @@ setInterval(async()=>{
|
|||||||
}
|
}
|
||||||
if (typeof results[1] == 'string'){
|
if (typeof results[1] == 'string'){
|
||||||
FScsg.fetchResult = `dag mp csg fail, ${results[1]}`;
|
FScsg.fetchResult = `dag mp csg fail, ${results[1]}`;
|
||||||
|
embed.addFields({name: 'CSG Status', value: results[1]})
|
||||||
} else if (results[1].status != 200){
|
} else if (results[1].status != 200){
|
||||||
if (results[1].status == 204){embed.setImage('https://http.cat/204')}
|
if (results[1].status == 204){embed.setImage('https://http.cat/204')}
|
||||||
FScsg.fetchResult = `dag mp csg fail with ${results[1].status + ' ' + results[1].statusText}`;
|
FScsg.fetchResult = `dag mp csg fail with ${results[1].status + ' ' + results[1].statusText}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user