From 77d24323790273b9fa371c8a825dcc2a27893d3e Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 8 Mar 2021 20:31:22 -0500 Subject: [PATCH] Only take mentions in name rate --- commands/random-seed/name-rater.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/random-seed/name-rater.js b/commands/random-seed/name-rater.js index 20bf90f6..c899cf40 100644 --- a/commands/random-seed/name-rater.js +++ b/commands/random-seed/name-rater.js @@ -27,7 +27,7 @@ module.exports = class NameRaterCommand extends Command { max: 25, default: msg => msg.author.username, validate: async name => { - const matches = name.match(/^(?:<@!?)?([0-9]+)>?$/); + const matches = name.match(/^(?:<@!?)([0-9]+)>$/); if (matches) { try { const user = await this.client.users.fetch(matches[1]); @@ -40,7 +40,7 @@ module.exports = class NameRaterCommand extends Command { return true; }, parse: name => { - const matches = name.match(/^(?:<@!?)?([0-9]+)>?$/); + const matches = name.match(/^(?:<@!?)([0-9]+)>$/); if (matches) return this.client.users.cache.get(matches[1]) || null; return name; }