From a8ef9e483e5c124de927219bfc2f772868633f9a Mon Sep 17 00:00:00 2001 From: Lena <7890309+DarkView@users.noreply.github.com> Date: Sat, 24 Jun 2023 21:58:54 +0200 Subject: [PATCH] Remove unnecessary slice() This fixes the weird "- Missing required option: "oken" bug. The bot exits on the very first missing required option, so I don't think this slice will ever do anything. --- src/cfg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfg.js b/src/cfg.js index 28179b3bd..e1c61859d 100644 --- a/src/cfg.js +++ b/src/cfg.js @@ -276,7 +276,7 @@ const configIsValid = validate(config); if (! configIsValid) { const errors = validate.errors.map(error => { if (error.params.missingProperty) { - return `Missing required option: "${error.params.missingProperty.slice(1)}"`; + return `Missing required option: "${error.params.missingProperty}"`; } else { return `The "${error.instancePath.slice(1)}" option ${error.message}. (Is currently: ${typeof config[error.instancePath.slice(1)]})`; }