From ffd0b91cd95db0c7944581e0eeade299bf8126ef Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Tue, 1 Jun 2021 13:01:03 -0600 Subject: [PATCH] linting fixes on utils --- src/lib/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/utils.js b/src/lib/utils.js index 225fb4e..d1089b4 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -96,7 +96,7 @@ async function findLastImage(msg, gif = false) { }); } -const urlRegex = /((https?):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+)/; +const urlRegex = /((https?):\/)?\/?([^:/\s]+)((\/\w+)*\/)([\w\-.]+)/; async function getImage(msg, str) { const img = await findLastImage(msg, false); @@ -112,7 +112,7 @@ async function getImage(msg, str) { const id = str.match(//)[1]; return `https://cdn.discordapp.com/emojis/${id}.png?v=1`; } else if (/<@!?([0-9]*)>/.test(str)) { - const id = url.match(/<@?!([0-9]*)>/)[1]; + const id = str.match(/<@?!([0-9]*)>/)[1]; const user = await hf.bot.requestHandler.request( "GET", "/users/" + id,