From 080ccf20a2e265f69d354544b02ae7f576a630dd Mon Sep 17 00:00:00 2001 From: Vivien Mouret Date: Thu, 15 Aug 2024 21:54:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20horror=20help?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/help.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/command/help.js b/command/help.js index 47513a1..2687bc3 100644 --- a/command/help.js +++ b/command/help.js @@ -54,17 +54,28 @@ module.exports = { console.log(`[${getCurrentDatetime('comm')}] GUIDOT HELP ${guidDot.statusText}`); guid = guidDot.data.split(new RegExp(`(s\/[^.]*-p)`, 'giu'))[1]; console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); - if (guid == undefined) return console.log(`[${getCurrentDatetime('comm')}] Error function help() GUID [${guid}]`); + if (guid == undefined) { + console.log(`[${getCurrentDatetime('comm')}] Error function help() GUID [${guid}]`); + return false + } guid = guid.split('s/')[1].split('-p')[0]; console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); - if (guid == undefined) return console.log(`[${getCurrentDatetime('comm')}] Error function help() GUID [${guid}]`); - + if (guid == undefined) { + console.log(`[${getCurrentDatetime('comm')}] Error function help() GUID [${guid}]`); + return false + } dot = guidDot.data.split(new RegExp(`(ge-[.]*...........)`, 'giu'))[1]; console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); - if (dot == undefined) return console.log(`[${getCurrentDatetime('comm')}] Error function help() DOT [${dot}]`); + if (dot == undefined) { + console.log(`[${getCurrentDatetime('comm')}] Error function help() DOT [${guid}]`); + return false + } dot = dot.split('.')[1].split(' ')[0]; console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); - if (dot == undefined) return console.log(`[${getCurrentDatetime('comm')}] Error function help() DOT [${dot}]`); + if (dot == undefined) { + console.log(`[${getCurrentDatetime('comm')}] Error function help() DOT [${guid}]`); + return false + } }; await message.channel @@ -100,7 +111,7 @@ DM ${lang === 'fr' ? 'envoyé' : 'sent'} ${client.emojis.cache.find(emoji => em .catch(err => { message.channel.send(language.helpError); console.log(`[${getCurrentDatetime('comm')}] Error function help() ${err}`); - return; + return false; }); } };