Files
xiao/commands/text-edit/b.js
T
Daniel Odendahl Jr b6afded306 Updates
2017-11-09 00:02:59 +00:00

29 lines
617 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class BCommand extends Command {
constructor(client) {
super(client, {
name: 'b',
aliases: ['🅱'],
group: 'text-edit',
memberName: 'b',
description: 'Replaces b with 🅱.',
args: [
{
key: 'text',
prompt: 'What text would you like to 🅱?',
type: 'string',
validate: text => {
if (text.replace(/b/gi, '🅱').length < 2000) return true;
return 'Invalid text, your text is too long.';
}
}
]
});
}
run(msg, { text }) {
return msg.say(text.replace(/b/gi, '🅱'));
}
};