This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
anitrox/commands/eval.js

24 lines
631 B
JavaScript
Raw Normal View History

2021-01-19 14:02:09 -06:00
module.exports = {
name: 'eval',
description: 'Runs js code',
execute(client, message, args) {
const commandName = args[0].toLowerCase();
if (message.author.id == 309427567004483586) {
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"});
} catch (err) {
console.log("An error occurred while running that code!")
}
};
}
}