diff --git a/index.js b/index.js index cc0a375..fe9119f 100644 --- a/index.js +++ b/index.js @@ -184,6 +184,26 @@ app.view("chooseopponent-BEGINNER", async (ctx) => { }) }) +app.command('/bm-eval', async (ctx) => { + await ctx.ack(); + + const resp = require('util').inspect(await eval(ctx.body.text), undefined, 1) + + ctx.respond({ + text: resp, + response_type: 'ephemeral', + blocks: [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: "```" + resp + "```" + } + } + ] + }) +}) + app.command('/viewopponents', async (ctx) => { await ctx.ack();