mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = class BeautifyCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { code }) {
|
||||
run(msg, { code }) {
|
||||
return msg.reply(stripIndents`
|
||||
\`\`\`${code.lang || 'js'}
|
||||
${beautify(code.code)}
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = class LintCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { code }) {
|
||||
run(msg, { code }) {
|
||||
if (!code.lang || ['js', 'javascript'].includes(code.lang)) {
|
||||
const errors = linter.verify(code.code, defaultConfig);
|
||||
if (!errors.length) return msg.reply(goodMessages[Math.floor(Math.random() * goodMessages.length)]);
|
||||
|
||||
Reference in New Issue
Block a user