From e0a88ff461e887a4053dc35e644ac402a5fe7090 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Fri, 30 Oct 2020 22:46:29 -0600 Subject: [PATCH] Smol bio bug --- commands/bio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/bio.js b/commands/bio.js index c1324d7..fc8486d 100644 --- a/commands/bio.js +++ b/commands/bio.js @@ -12,7 +12,7 @@ module.exports = { let tu = await UserData.findOne({uid: message.author.id}) ? await UserData.findOne({uid: message.author.id}) : new UserData({uid: message.author.id}); if (['v', 'view', 'check'].includes(args[0].toLowerCase())) { - let person = args[1] ? args[1].match(/<@(?:!?)(?:\d+)>/) && message.mentions.users.first() ? message.mentions.users.first().id : message.guild && message.guild.members.cache.has(args[1]) ? args[1] : message.author.id : message.author.id; + let person = args[1] ? args[1].match(/^<@(?:!?)(?:\d+)>$/) && message.mentions.users.first() ? message.mentions.users.first().id : message.guild && message.guild.members.cache.has(args[1]) ? args[1] : message.author.id : message.author.id; let pud = await UserData.findOne({uid: person}); if (!pud || !pud.bio || !pud.bio.length) {return message.reply(person === message.author.id ? "You don't have a bio set!" : "That user has no bio for me to show you!");} return message.channel.send(new Discord.MessageEmbed()