Files
xiao/commands/edit-text/snake-speak.js
T
Dragon Fire ebd26a7b0e Node 15
2020-10-24 14:25:32 -04:00

29 lines
727 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class SnakeSpeakCommand extends Command {
constructor(client) {
super(client, {
name: 'snake-speak',
aliases: ['snek-speak'],
group: 'edit-text',
memberName: 'snake-speak',
description: 'Convertsssss text to sssssnake ssssspeak.',
args: [
{
key: 'text',
prompt: 'What text would you like to convert to sssssnake ssssspeak?',
type: 'string',
validate: text => {
if (text.replace(/s/gi, 'sssss').length < 2000) return true;
return 'Invalid text, your text is too long.';
}
}
]
});
}
run(msg, { text }) {
return msg.say(text.replaceAll('s', 'sssss').replaceAll('S', 'SSSSS'));
}
};