aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/eval.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-03 09:49:14 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-03 09:49:14 -0400
commit87d58eb925d0bde22626eb3a1e9ea03ab97d3a29 (patch)
treebd3229128608c90fd57d7ae152c1b42df5b94ba2 /src/commands/dev/eval.ts
parentaf845599600c3e3d72b3165bfbc9da7e4aa015bd (diff)
downloadtanzanite-87d58eb925d0bde22626eb3a1e9ea03ab97d3a29.tar.gz
tanzanite-87d58eb925d0bde22626eb3a1e9ea03ab97d3a29.tar.bz2
tanzanite-87d58eb925d0bde22626eb3a1e9ea03ab97d3a29.zip
eval methods
Diffstat (limited to 'src/commands/dev/eval.ts')
-rw-r--r--src/commands/dev/eval.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index cbc6518..2f61822 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -22,11 +22,11 @@ export default class EvalCommand extends BushCommand {
{ id: 'typescript', match: 'flag', flag: '--ts' },
{ id: 'hidden', match: 'flag', flag: '--hidden' },
{ id: 'show_proto', match: 'flag', flag: '--proto' },
- // {
- // id: 'show_methods',
- // match: 'flag',
- // flag: ['--func', '--function', '--functions', '--meth', '--method', '--methods']
- // },
+ {
+ id: 'show_methods',
+ match: 'flag',
+ flag: ['--func', '--function', '--functions', '--meth', '--method', '--methods']
+ },
{
id: 'code',
match: 'rest',
@@ -42,8 +42,8 @@ export default class EvalCommand extends BushCommand {
{ name: 'silent', description: 'Whether or not to make the response silent', type: 'BOOLEAN', required: false },
{ name: 'typescript', description: 'Whether or not the code is typescript.', type: 'BOOLEAN', required: false },
{ name: 'hidden', description: 'Whether or not to show hidden items.', type: 'BOOLEAN', required: false },
- { name: 'show_proto', description: 'Show prototype.', type: 'BOOLEAN', required: false }
- // { name: 'show_methods', description: 'Show class functions.', type: 'BOOLEAN', required: false }
+ { name: 'show_proto', description: 'Show prototype.', type: 'BOOLEAN', required: false },
+ { name: 'show_methods', description: 'Show class functions.', type: 'BOOLEAN', required: false }
],
ownerOnly: true
});
@@ -60,7 +60,7 @@ export default class EvalCommand extends BushCommand {
typescript: boolean;
hidden: boolean;
show_proto: boolean;
- // show_methods: boolean;
+ show_methods: boolean;
}
): Promise<unknown> {
if (!message.author.isOwner())
@@ -130,7 +130,7 @@ export default class EvalCommand extends BushCommand {
getters: true,
showProxy: true
});
- // const methods = args.show_methods ? await util.inspectCleanRedactCodeblock(util.getMethods(rawOutput), 'js') : undefined;
+ const methods = args.show_methods ? await util.inspectCleanRedactCodeblock(util.getMethods(rawOutput), 'js') : undefined;
const proto = args.show_proto
? await util.inspectCleanRedactCodeblock(Object.getPrototypeOf(rawOutput), 'js', {
depth: 1,
@@ -143,7 +143,7 @@ export default class EvalCommand extends BushCommand {
if (inputTS) embed.addField('📥 Input (typescript)', inputTS).addField('📥 Input (transpiled javascript)', inputJS);
else embed.addField('📥 Input', inputJS);
embed.addField('📤 Output', output);
- // if (methods) embed.addField('🔧 Methods', methods);
+ if (methods) embed.addField('🔧 Methods', methods);
if (proto) embed.addField('⚙️ Proto', proto);
} catch (e) {
embed.setTitle(`${emojis.errorFull} Unable to Evaluate Expression`).setColor(colors.error);