utils: fix missed request handler calls
This commit is contained in:
parent
f52f14d3a3
commit
12289bbee9
1 changed files with 6 additions and 12 deletions
|
@ -113,10 +113,7 @@ async function getImage(msg, str) {
|
|||
return `https://cdn.discordapp.com/emojis/${id}.png?v=1`;
|
||||
} else if (/<@!?([0-9]*)>/.test(refMsg.content)) {
|
||||
const id = refMsg.content.match(/<@!?([0-9]*)>/)[1];
|
||||
const user = await hf.bot.rest.authRequest({
|
||||
method: "GET",
|
||||
path: "/users/" + id,
|
||||
});
|
||||
const user = await hf.bot.requestHandler.request("GET", "/users/" + id);
|
||||
if (user)
|
||||
return `https://cdn.discordapp.com/avatars/${id}/${user.avatar}.png?size=1024`;
|
||||
}
|
||||
|
@ -136,10 +133,7 @@ async function getImage(msg, str) {
|
|||
return `https://cdn.discordapp.com/emojis/${id}.png?v=1`;
|
||||
} else if (/<@!?([0-9]*)>/.test(str)) {
|
||||
const id = str.match(/<@!?([0-9]*)>/)[1];
|
||||
const user = await hf.bot.rest.authRequest({
|
||||
method: "GET",
|
||||
path: "/users/" + id,
|
||||
});
|
||||
const user = await hf.bot.requestHandler.request("GET", "/users/" + id);
|
||||
if (user)
|
||||
return `https://cdn.discordapp.com/avatars/${id}/${user.avatar}.png?size=1024`;
|
||||
} else if (img) {
|
||||
|
@ -277,10 +271,10 @@ async function selectionMessage(
|
|||
|
||||
async function lookupUser(msg, str, filter) {
|
||||
if (/[0-9]{17,21}/.test(str)) {
|
||||
return await hf.bot.rest.authRequest({
|
||||
method: "GET",
|
||||
path: "/users/" + str.match(/([0-9]{17,21})/)[1],
|
||||
});
|
||||
return await hf.bot.requestHandler.request(
|
||||
"GET",
|
||||
"/users/" + str.match(/([0-9]{17,21})/)[1]
|
||||
);
|
||||
}
|
||||
|
||||
let users;
|
||||
|
|
Loading…
Reference in a new issue