From ee148c8adae72e41cb1c8c0919b41095b6a3f854 Mon Sep 17 00:00:00 2001 From: migue802 <54627022+migue802@users.noreply.github.com> Date: Thu, 28 Jul 2022 23:26:58 +0100 Subject: [PATCH] Fixing an error in eval command that it've been since years! I use this repo always to copy the eval command, and always that I copy the code I have to fix this error. The thing is that if the code wasn't evaled, then it wasn't cleaned, meaning that it will send undefined. --- examples/making-an-eval-command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/making-an-eval-command.md b/examples/making-an-eval-command.md index e014ad5..92fc613 100644 --- a/examples/making-an-eval-command.md +++ b/examples/making-an-eval-command.md @@ -109,7 +109,7 @@ client.on("messageCreate", async (message) => { message.channel.send(`\`\`\`js\n${cleaned}\n\`\`\``); } catch (err) { // Reply in the channel with our error - message.channel.send(`\`ERROR\` \`\`\`xl\n${cleaned}\n\`\`\``); + message.channel.send(`\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``); } // End of our command