utility.banner: fix redef error
This commit is contained in:
parent
e2819ce5a5
commit
a693f06d1e
1 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue