From 0cc44ac9ff3eddc3425b2c7a98268c727b9c77c6 Mon Sep 17 00:00:00 2001 From: Navy Date: Mon, 9 Nov 2020 20:18:15 +0200 Subject: [PATCH] async flag for async eval ops --- .../client/components/commands/developer/Evaluate.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/structure/client/components/commands/developer/Evaluate.js b/structure/client/components/commands/developer/Evaluate.js index 455fcfa..ce60e58 100644 --- a/structure/client/components/commands/developer/Evaluate.js +++ b/structure/client/components/commands/developer/Evaluate.js @@ -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 {