Lanbot_Music_V12/commands/Developpeur/eval.js

17 lines
675 B
JavaScript
Raw Permalink Normal View History

2022-01-04 02:35:59 +01:00
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;