Only allow js in beautify

This commit is contained in:
Dragon Fire
2021-05-23 07:17:20 -04:00
parent d8c4b53036
commit 563343d3ff
+1
View File
@@ -21,6 +21,7 @@ module.exports = class BeautifyCommand extends Command {
}
run(msg, { code }) {
if (code.lang && code.lang !== 'js') return msg.reply('I can only beautify JavaScript.');
return msg.reply(`\`\`\`${code.lang || 'js'}\n${beautify(code.code)}\n\`\`\``);
}
};