async flag for async eval ops
This commit is contained in:
parent
ddddb20ae7
commit
0cc44ac9ff
@ -1,5 +1,7 @@
|
||||
const { inspect } = require('util');
|
||||
const { username } = require('os').userInfo();
|
||||
|
||||
const { Util } = require('../../../../../util');
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const moment = require('moment');
|
||||
|
||||
@ -32,6 +34,12 @@ class Evaluate extends Command {
|
||||
type: 'BOOLEAN',
|
||||
types: ['FLAG'],
|
||||
default: true
|
||||
},
|
||||
{
|
||||
name: 'async',
|
||||
type: 'BOOLEAN',
|
||||
types: ['FLAG'],
|
||||
default: true
|
||||
}
|
||||
],
|
||||
showUsage: true,
|
||||
@ -45,6 +53,7 @@ class Evaluate extends Command {
|
||||
async execute(message, { params, args }) {
|
||||
|
||||
params = params.join(' ');
|
||||
if (args.async) params = `(async () => {${params}})()`;
|
||||
const { guild, author, member, client } = message; //eslint-disable-line no-unused-vars
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user