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