mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Transparent error messages on Discord side
This commit is contained in:
parent
46bd01493d
commit
0d2e20b1e0
@ -87,9 +87,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
|
|||||||
msg.edit({content:'This embed updates every 35 seconds.',embeds:[serverDetails, playersEmbed]});
|
msg.edit({content:'This embed updates every 35 seconds.',embeds:[serverDetails, playersEmbed]});
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if (err.message === 'The operation was aborted due to timeout') return msg.edit({content: 'Connection timed out.', embeds: [serverErrorEmbed]});
|
msg.edit({content: err.message, embeds: [serverErrorEmbed]});
|
||||||
if (err.message === 'Cannot read properties of undefined (reading \'name\')') return msg.edit({content: 'Connection to the host has been disrupted.', embeds: [serverErrorEmbed]});
|
|
||||||
msg.edit({content: null, embeds: [serverErrorEmbed]});
|
|
||||||
console.log(client.logTime(), LogPrefix('MPModule'),`Failed to make a request for ${ServerName}:`, err.message)
|
console.log(client.logTime(), LogPrefix('MPModule'),`Failed to make a request for ${ServerName}:`, err.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user