Lanbot_Music_V12/commands/Developpeur/eval.js
2022-01-04 01:35:59 +00:00

17 lines
675 B
JavaScript

const { MESSAGES } = require("../../util/constants");
module.exports.run = async (client, message, args) => {
function clean(text) {
if (typeof text === "string")
return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
return text;
}
if (message.author.id !== "327193195085824001") return message.channel.send("Cette commande est réservé au développeur de LanBot");
const code = args.join(" ");
const evaled = eval(code);
const cleanCode = await clean(evaled);
message.channel.send(cleanCode, { code: "js" });
};
module.exports.help = MESSAGES.COMMANDS.DEVELOPPEUR.EVAL;