2022-08-14 05:51:45 -04:00
|
|
|
/* eslint-disable max-len */
|
|
|
|
const util = require('util');
|
|
|
|
const {stylize} = require('../util/colors/minecraft');
|
|
|
|
module.exports = {
|
|
|
|
name: 'servereval',
|
|
|
|
alias: [],
|
2022-11-23 04:24:00 -05:00
|
|
|
description: 'Basically eval command but without vm2',
|
2022-08-14 05:51:45 -04:00
|
|
|
trusted: 2,
|
|
|
|
usage: '<ownerhash> <code>',
|
2022-11-16 06:41:30 -05:00
|
|
|
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
|
2022-11-23 04:24:00 -05:00
|
|
|
try {
|
|
|
|
bot.tellraw(selector, {text: `${util.inspect(eval(args.slice(1).join(' ')), {stylize: stylize})}`.substring(0, 32000)});
|
|
|
|
} catch (err) {
|
|
|
|
bot.tellraw(selector, {text: `${util.inspect(err).replaceAll('runner', 'chayapak1')}`, color: 'red'});
|
2022-08-14 05:51:45 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|