mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
23
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
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 cowsay.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like the cow to say?',
|
||||
type: 'string',
|
||||
validate: (text) => {
|
||||
if (text.length < 1500) return true;
|
||||
else return 'Text must be under 1500 characters.';
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
return msg.code(null,
|
||||
stripIndent`
|
||||
< ${text} >
|
||||
\\ ^__^
|
||||
\\ (oO)\\_______
|
||||
(__)\\ )\\/\\
|
||||
U ||----w |
|
||||
|| ||
|
||||
`
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user