utility.avatar: add checks
This commit is contained in:
parent
2dbe433b1d
commit
d7162a0694
1 changed files with 20 additions and 16 deletions
|
@ -127,16 +127,17 @@ avatar.callback = async function (msg, line) {
|
|||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024");
|
||||
const guildUrl =
|
||||
guildAvatar &&
|
||||
"https://cdn.discordapp.com/guilds/" +
|
||||
guild.id +
|
||||
"/users/" +
|
||||
member.id +
|
||||
"/avatars/" +
|
||||
guildAvatar +
|
||||
"." +
|
||||
(guildAvatar.startsWith("a_")
|
||||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024");
|
||||
guild.id +
|
||||
"/users/" +
|
||||
member.id +
|
||||
"/avatars/" +
|
||||
guildAvatar +
|
||||
"." +
|
||||
(guildAvatar.startsWith("a_")
|
||||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024");
|
||||
|
||||
baseEmbed.description =
|
||||
`[Normal avatar](${normalUrl})` +
|
||||
|
@ -170,14 +171,17 @@ avatar.callback = async function (msg, line) {
|
|||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024");
|
||||
const guildUrl =
|
||||
guildAvatar &&
|
||||
"https://cdn.discordapp.com/guilds/" +
|
||||
guild.id +
|
||||
"/users/" +
|
||||
msg.author.id +
|
||||
"/avatars/" +
|
||||
guildAvatar +
|
||||
"." +
|
||||
(guildAvatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024");
|
||||
guild.id +
|
||||
"/users/" +
|
||||
msg.author.id +
|
||||
"/avatars/" +
|
||||
guildAvatar +
|
||||
"." +
|
||||
(guildAvatar.startsWith("a_")
|
||||
? "gif?size=1024&_=.gif"
|
||||
: "png?size=1024");
|
||||
|
||||
baseEmbed.description =
|
||||
`[Normal avatar](${normalUrl})` +
|
||||
|
|
Loading…
Reference in a new issue