From 1d780c313da1bb1a80e9db9609f215a3a2f3c4e1 Mon Sep 17 00:00:00 2001 From: Bsian Date: Thu, 2 Apr 2020 01:14:24 +0100 Subject: [PATCH] Fix? --- src/commands/eval.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index ba00814..f5ea0cf 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -26,11 +26,11 @@ export default class Eval extends Command { if (args[0] && args[0].startsWith('-d')) { depth = Number(args[0].replace('-d', '')); if (!depth || depth < 0) depth = 0; - const index = evalMessage.findIndex((v) => v.startsWith('-d')); + const index = evalMessage.findIndex((v) => v.startsWith('-d')) + 1; evalString = evalMessage.slice(index).join(' ').trim(); } if (args[0] === '-a') { - const index = evalMessage.findIndex((v) => v === '-a'); + const index = evalMessage.findIndex((v) => v === '-a') + 1; message.channel.createMessage(`${index}`); evalString = `(async () => { ${evalMessage.slice(index).join(' ').trim()} })()`; }