Change to using config for ID

This commit is contained in:
IDeletedSystem64 2022-03-28 13:06:41 -05:00
parent 3b33f51c65
commit e861e702c0

View file

@ -1,22 +1,21 @@
const { inspect } = require("util"); const { inspect } = require("util");
module.exports = { module.exports = {
name: 'eval', name: 'eval',
description: 'Runs js code', description: 'Executes JS code',
async execute(_, message, args, footerTxt) { async execute(_, message, args, config) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == config.ownerID) {
try { try {
const code = args.join(" "); const code = args.join(" ");
const evaled = inspect(eval(code)); const evaled = inspect(eval(code));
await message.channel.send(evaled, {code:"xl"}); await message.channel.send(evaled, {code:"xl"});
} catch (error) { } catch (error) {
await message.channel.send({embed: { await message.channel.send({embed: {
"title": "<:NyabotError:697145462347661412> **Well that happened...**", "title": "<:AnitroxError:809651936563429416> **Something went wrong! **",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"fields": [ "fields": [
{ {