mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
29 lines
622 B
JavaScript
29 lines
622 B
JavaScript
const Command = require('../../structures/Command');
|
|
|
|
module.exports = class BCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'b',
|
|
aliases: ['🅱'],
|
|
group: 'text-edit',
|
|
memberName: 'b',
|
|
description: '🅱.',
|
|
args: [
|
|
{
|
|
key: 'text',
|
|
prompt: 'What text would you like to 🅱?',
|
|
type: 'string',
|
|
validate: text => {
|
|
if (text.replace(/(b|d|g|p|q)/gi, '🅱').length < 2000) return true;
|
|
return 'Invalid text, your text is too long.';
|
|
}
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { text }) {
|
|
return msg.say(text.replace(/(b|d|g|p|q)/gi, '🅱'));
|
|
}
|
|
};
|