utility.avatar: add checks

This commit is contained in:
Cynthia Foxwell 2022-04-03 10:42:05 -06:00
parent 2dbe433b1d
commit d7162a0694

View file

@ -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})` +