1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 12:30:58 -04:00

DNS.. please...

This commit is contained in:
AnxietyisReal 2023-06-20 16:01:18 +10:00
parent 051cb34fe4
commit f085c99a19

View File

@ -27,7 +27,7 @@ client.on('ready', async()=>{
// Handle errors // Handle errors
function DZ(error:Error, location:string){// Yes, I may have shiternet but I don't need to wake up to like a hundred messages or so. function DZ(error:Error, location:string){// Yes, I may have shiternet but I don't need to wake up to like a hundred messages or so.
if (['getaddrinfo ENOTFOUND discord.com'].includes(error.message)) return; if (['ENOTFOUND discord.com', 'EAI_AGAIN discord.com'].includes(error.message)) return;
//console.error(error); //console.error(error);
const channel = client.channels.resolve(client.config.mainServer.channels.errors) as Discord.TextChannel | null; const channel = client.channels.resolve(client.config.mainServer.channels.errors) as Discord.TextChannel | null;
channel?.send({embeds: [new client.embed().setColor('#420420').setTitle('Error caught!').setFooter({text: location}).setDescription(`**Error:** \`${error.message}\`\n\n**Stack:** \`${`${error.stack}`.slice(0, 2500)}\``)]}) channel?.send({embeds: [new client.embed().setColor('#420420').setTitle('Error caught!').setFooter({text: location}).setDescription(`**Error:** \`${error.message}\`\n\n**Stack:** \`${`${error.stack}`.slice(0, 2500)}\``)]})