Remove discriminator command

This commit is contained in:
Dragon Fire
2020-04-12 20:35:47 -04:00
parent e193b8d738
commit dde518c782
3 changed files with 2 additions and 41 deletions
+1 -2
View File
@@ -132,7 +132,7 @@ in the appropriate channel's topic to use it.
## Commands
Total: 385
Total: 384
### Utility:
@@ -154,7 +154,6 @@ Total: 385
* **avatar:** Responds with a user's avatar.
* **channel:** Responds with detailed information on a channel.
* **discriminator:** Searches for other users with a certain discriminator.
* **emoji-image:** Responds with an emoji's full-scale image.
* **emoji-list:** Responds with a list of the server's custom emoji.
* **emoji:** Responds with detailed information on an emoji.
-38
View File
@@ -1,38 +0,0 @@
const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const { trimArray } = require('../../util/Util');
module.exports = class DiscriminatorCommand extends Command {
constructor(client) {
super(client, {
name: 'discriminator',
aliases: ['discrim', 'search-discrim', 'search-discriminator'],
group: 'info',
memberName: 'discriminator',
description: 'Searches for other users with a certain discriminator.',
args: [
{
key: 'discrim',
label: 'discriminator',
prompt: 'Which discriminator would you like to search for?',
type: 'string',
default: msg => msg.author.discriminator,
validate: discrim => {
if (/^[0-9]+$/.test(discrim) && discrim.length === 4) return true;
return 'Invalid discriminator.';
}
}
]
});
}
run(msg, { discrim }) {
const users = this.client.users.cache
.filter(user => user.discriminator === discrim)
.map(user => user.username);
return msg.say(stripIndents`
**Found ${users.length} users with the discriminator #${discrim}:**
${trimArray(users, 50).join(', ')}
`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "112.22.0",
"version": "113.0.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {