mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
More uniform group names
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MOCKING_EMOJI_ID, MOCKING_EMOJI_NAME } = process.env;
|
||||
|
||||
module.exports = class MockingCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'mocking',
|
||||
aliases: ['mock'],
|
||||
group: 'edit-text',
|
||||
memberName: 'mocking',
|
||||
description: 'SenDs TexT lIkE ThiS.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'WHaT tEXt WoUlD yOu LiKE to COnvErt?',
|
||||
type: 'string',
|
||||
max: 1950,
|
||||
parse: text => text.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { text }) {
|
||||
const canEmoji = msg.channel.type === 'text'
|
||||
? msg.channel.permissionsFor(this.client.user).has('USE_EXTERNAL_EMOJIS')
|
||||
: true;
|
||||
const letters = text.split('');
|
||||
for (let i = 0; i < letters.length; i += Math.floor(Math.random() * 4)) {
|
||||
letters[i] = letters[i].toUpperCase();
|
||||
}
|
||||
return msg.say(`${letters.join('')}${canEmoji ? this.mockingEmoji : ''}`);
|
||||
}
|
||||
|
||||
get mockingEmoji() {
|
||||
return MOCKING_EMOJI_ID && MOCKING_EMOJI_NAME ? ` <:${MOCKING_EMOJI_NAME}:${MOCKING_EMOJI_ID}>` : '';
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user