Only strip first beautify indent

This commit is contained in:
Dragon Fire
2021-05-23 07:14:32 -04:00
parent fca3e3012d
commit 21f1f44566
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const Command = require('../../structures/Command');
const { js_beautify: beautify } = require('js-beautify');
const { stripIndents } = require('common-tags');
const { stripIndent } = require('common-tags');
module.exports = class BeautifyCommand extends Command {
constructor(client) {
@@ -22,7 +22,7 @@ module.exports = class BeautifyCommand extends Command {
}
run(msg, { code }) {
return msg.reply(stripIndents`
return msg.reply(stripIndent`
\`\`\`${code.lang || 'js'}
${beautify(code.code)}
\`\`\`