mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
38 lines
794 B
JavaScript
38 lines
794 B
JavaScript
const Command = require('../../structures/Command');
|
|
const { stripIndent } = require('common-tags');
|
|
|
|
module.exports = class CowsayCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'cow-say',
|
|
group: 'text-edit',
|
|
memberName: 'cow-say',
|
|
description: 'Converts text to cow-say.',
|
|
args: [
|
|
{
|
|
key: 'text',
|
|
prompt: 'What text would you like the cow to say?',
|
|
type: 'string',
|
|
validate: text => {
|
|
if (text.length < 1500) return true;
|
|
return 'Invalid text, please keep the text under 1500 characters.';
|
|
}
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { text }) {
|
|
return msg.code(null,
|
|
stripIndent`
|
|
< ${text} >
|
|
\\ ^__^
|
|
\\ (oO)\\_______
|
|
(__)\\ )\\/\\
|
|
U ||----w |
|
|
|| ||
|
|
`
|
|
);
|
|
}
|
|
};
|