utility.banner: fix redef error

This commit is contained in:
Cynthia Foxwell 2022-11-29 19:36:17 -07:00
parent e2819ce5a5
commit a693f06d1e

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", method: "GET",
path: "/users/" + id, 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}.${ const url = `${BANNER_BASE}${userObj.id}/${userObj.banner}.${
user.banner.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024" userObj.banner.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
}`; }`;
return { return {
embeds: [ embeds: [
{ {
title: `Banner for \`${user.username}#${user.discriminator}\``, title: `Banner for \`${userObj.username}#${userObj.discriminator}\``,
url, url,
image: { image: {
url, url,