From dde518c78264ff64da4de11da8f77dd9c73822d8 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 12 Apr 2020 20:35:47 -0400 Subject: [PATCH] Remove discriminator command --- README.md | 3 +-- commands/info/discriminator.js | 38 ---------------------------------- package.json | 2 +- 3 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 commands/info/discriminator.js diff --git a/README.md b/README.md index d9c0ce92..394a5285 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/commands/info/discriminator.js b/commands/info/discriminator.js deleted file mode 100644 index 9b3c16b4..00000000 --- a/commands/info/discriminator.js +++ /dev/null @@ -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(', ')} - `); - } -}; diff --git a/package.json b/package.json index 662b0c7f..d0e2e48b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "112.22.0", + "version": "113.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {