utility.banner: fix redef error

This commit is contained in:
Cynthia Foxwell 2022-11-29 19:36:17 -07:00
parent e2819ce5a5
commit a693f06d1e
1 changed files with 5 additions and 5 deletions

View File

@ -242,20 +242,20 @@ banner.callback = async function (msg, line, [user], {server, guild}) {
}
}
const user = await hf.bot.rest.authRequest({
const userObj = await hf.bot.rest.authRequest({
method: "GET",
path: "/users/" + id,
});
if (!user.banner) return "This user does not have a banner.";
if (!userObj.banner) return "This user does not have a banner.";
const url = `${BANNER_BASE}${user.id}/${user.banner}.${
user.banner.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
const url = `${BANNER_BASE}${userObj.id}/${userObj.banner}.${
userObj.banner.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
}`;
return {
embeds: [
{
title: `Banner for \`${user.username}#${user.discriminator}\``,
title: `Banner for \`${userObj.username}#${userObj.discriminator}\``,
url,
image: {
url,