brain tiny send help

master
Kit Kasune 3 years ago
parent 6dc751bbcb
commit c7432df0f3
  1. 14
      commands/dev/eval.js

@ -21,19 +21,11 @@ module.exports = {
if (!client.developers.includes(message.author.id)) {return message.channel.send("Sorry, but I've got trust issues, so only me devs can go commanding me around like that.");};
if (!args.length) return message.channel.send(`Syntax: \`${prefix}eval <code>\``);
if (!args.length) {return message.reply("Please specify a bio!");}
let args2 = msg.startsWith(prefix)
? message.content.slice(prefix.length).trim().split(/ +/g)
: msg.startsWith('<@!')
? message.content.slice(4 + client.user.id.length).trim().split(/ +/g)
: message.content.slice(3 + client.user.id.length).trim().split(/ +/g);
args2.shift(); args2.shift();
let options = new TagFilter([new Tag(['s', 'silent', 'nr', 'noreply'], 'silent', 'toggle')]).test(args2[0]);
if (options.silent) {args2.shift();}
let options = new TagFilter([new Tag(['s', 'silent', 'nr', 'noreply'], 'silent', 'toggle')]).test(args[0]);
if (options.silent) {args.shift();}
if (!args.length) {return message.channel.send("Silly goose, if you want me to do something, you have to tell me what!");}
const result = new Promise((resolve) => resolve(eval(args2.join(' '))));
const result = new Promise((resolve) => resolve(eval(args.join(' '))));
return result.then((output) => {
if (typeof output !== 'string') {
output = require('util').inspect(output, {depth: 0});

Loading…
Cancel
Save