mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Destructuring Args
This commit is contained in:
@@ -19,6 +19,9 @@ module.exports = class TemmieCommand extends Command {
|
||||
return 'Your message content is too long.';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
parse: text => {
|
||||
return translator.wordTrans(text, dictionary);
|
||||
}
|
||||
}]
|
||||
});
|
||||
@@ -28,8 +31,7 @@ module.exports = class TemmieCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const text = args.text;
|
||||
const temmized = translator.wordTrans(text, dictionary);
|
||||
return message.say(`\u180E${temmized}`);
|
||||
const { text } = args;
|
||||
return message.say(`\u180E${text}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user