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.
2021-01-19 14:02:09 -06:00
|
|
|
|
|
|
|
module.exports = {
|
2021-01-23 01:08:05 -06:00
|
|
|
|
2021-01-19 14:02:09 -06:00
|
|
|
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);
|
2021-01-23 01:08:05 -06:00
|
|
|
|
2021-01-19 14:02:09 -06:00
|
|
|
if (typeof evaled !== "string")
|
|
|
|
evaled = require("util").inspect(evaled);
|
2021-01-23 01:08:05 -06:00
|
|
|
|
2021-01-19 14:02:09 -06:00
|
|
|
message.channel.send(clean(evaled), {code:"xl"});
|
2021-01-23 01:08:05 -06:00
|
|
|
} catch (error) {
|
|
|
|
const embed = {
|
|
|
|
"title": "<:NyabotError:697145462347661412> **Well that happened...**",
|
|
|
|
"color": 13632027,
|
|
|
|
"footer": {
|
|
|
|
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
|
|
|
"text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved."
|
|
|
|
},
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "**What Happened?**",
|
|
|
|
"value": "The command you tried to run failed to execute due to an error."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Error Info",
|
|
|
|
"value": error.message
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
message.channel.send({ embed });
|
2021-01-19 14:02:09 -06:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|