linting fixes on utils

This commit is contained in:
Cynthia Foxwell 2021-06-01 13:01:03 -06:00
parent d98cf63824
commit ffd0b91cd9
1 changed files with 2 additions and 2 deletions

View File

@ -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(/<a?:[a-zA-Z0-9_]*:([0-9]*)>/)[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,