forked from engineering/cloudservices
args
parent
27cbb57ccf
commit
02e41276cf
|
@ -30,13 +30,13 @@ export default class Eval extends Command {
|
|||
await message.channel.createMessage(`depth: ${evalMessage.slice(index).join(' ').trim()}`);
|
||||
evalString = evalMessage.slice(index).join(' ').trim();
|
||||
}
|
||||
await message.channel.createMessage(`eval after depth: ${evalString}`);
|
||||
await message.channel.createMessage(`eval after depth: ${evalString}\n${args.join()}`);
|
||||
if (args[0] === '-a') {
|
||||
const index = evalMessage.findIndex((v) => v === '-a') + 1;
|
||||
await message.channel.createMessage(`async: ${evalMessage.slice(index).join(' ').trim()}`);
|
||||
evalString = `(async () => { ${evalMessage.slice(index).join(' ').trim()} })()`;
|
||||
}
|
||||
await message.channel.createMessage(`eval after async: ${evalString}`);
|
||||
await message.channel.createMessage(`eval after async: ${evalString}\n${args.join()}`);
|
||||
|
||||
try {
|
||||
evaled = await eval(evalString);
|
||||
|
|
Loading…
Reference in New Issue