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
+1 -2
View File
@@ -350,8 +350,7 @@ client.on('guildMemberRemove', async member => {
});
client.on('voiceStateUpdate', async (oldState, newState) => {
if (newState.channel) return;
if (!oldState.channel) return;
if (newState.channel || !oldState.channel) return;
if (oldState.id === client.user.id) {
const dispatcher = client.dispatchers.get(oldState.guild.id);
if (!dispatcher) return;
+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)}
\`\`\`