mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Provide Axios status when host is unreachable.
This commit is contained in:
parent
bfba4fb4d2
commit
e78f4bb3fb
@ -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();
|
||||
|
@ -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}`;
|
||||
|
Loading…
Reference in New Issue
Block a user