utility.avatar: fixes for guild avatars
This commit is contained in:
parent
159870877b
commit
4dadf820af
1 changed files with 6 additions and 6 deletions
|
@ -98,8 +98,9 @@ avatar.callback = async function (msg, line) {
|
|||
) {
|
||||
return user;
|
||||
} else {
|
||||
const url = `${AVATAR_BASE}${user.id}/${user.avatar}.${
|
||||
user.avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
|
||||
const avatar = user.avatar || user.user.avatar;
|
||||
const url = `${AVATAR_BASE}${user.id}/${avatar}.${
|
||||
avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
|
||||
}`;
|
||||
return {
|
||||
embed: {
|
||||
|
@ -112,10 +113,9 @@ avatar.callback = async function (msg, line) {
|
|||
};
|
||||
}
|
||||
} else {
|
||||
const url = `${AVATAR_BASE}${msg.author.id}/${msg.author.avatar}.${
|
||||
msg.author.avatar.startsWith("a_")
|
||||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024"
|
||||
const avatar = msg.member.avatar || msg.author.avatar;
|
||||
const url = `${AVATAR_BASE}${msg.author.id}/${avatar}.${
|
||||
avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
|
||||
}`;
|
||||
return {
|
||||
embed: {
|
||||
|
|
Loading…
Reference in a new issue