Change to using config for ID
This commit is contained in:
parent
3b33f51c65
commit
e861e702c0
1 changed files with 5 additions and 6 deletions
|
@ -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": [
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue