From 0a624a479b95daa93a70c030475263e73d0c322b Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Thu, 14 Sep 2023 20:03:36 +1000 Subject: [PATCH] Transparent error messages on Discord side --- src/funcs/MPModule.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/funcs/MPModule.ts b/src/funcs/MPModule.ts index 8bc3e63..0b92a95 100644 --- a/src/funcs/MPModule.ts +++ b/src/funcs/MPModule.ts @@ -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]}); } } catch(err) { - if (err.message === 'The operation was aborted due to timeout') return msg.edit({content: 'Connection timed out.', 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]}); + msg.edit({content: err.message, embeds: [serverErrorEmbed]}); console.log(client.logTime(), LogPrefix('MPModule'),`Failed to make a request for ${ServerName}:`, err.message) } }