Files
xiao/commands/edit-text/spoiler-letter.js
T
2020-04-09 14:37:24 -04:00

29 lines
725 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class SpoilerLetterCommand extends Command {
constructor(client) {
super(client, {
name: 'spoiler-letter',
aliases: ['spoiler'],
group: 'edit-text',
memberName: 'spoiler-letter',
description: 'Sends text with each and every character as an individual spoiler.',
args: [
{
key: 'text',
prompt: 'What text would you like to convert?',
type: 'string',
validate: text => {
if (`||${text.split('').join('||||')}||`.length < 2000) return true;
return 'Invalid text, your text is too long.';
}
}
]
});
}
run(msg, { text }) {
return msg.say(`||${text.split('').join('||||')}||`);
}
};