1
0
Fork 0
refactor/models
Bsian 2020-04-02 01:14:24 +01:00
parent fa2a0c8c10
commit 1d780c313d
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 2 deletions

View File

@ -26,11 +26,11 @@ export default class Eval extends Command {
if (args[0] && args[0].startsWith('-d')) { if (args[0] && args[0].startsWith('-d')) {
depth = Number(args[0].replace('-d', '')); depth = Number(args[0].replace('-d', ''));
if (!depth || depth < 0) depth = 0; 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(); evalString = evalMessage.slice(index).join(' ').trim();
} }
if (args[0] === '-a') { if (args[0] === '-a') {
const index = evalMessage.findIndex((v) => v === '-a'); const index = evalMessage.findIndex((v) => v === '-a') + 1;
message.channel.createMessage(`${index}`); message.channel.createMessage(`${index}`);
evalString = `(async () => { ${evalMessage.slice(index).join(' ').trim()} })()`; evalString = `(async () => { ${evalMessage.slice(index).join(' ').trim()} })()`;
} }