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"
|
? "gif?size=1024&_=.gif"
|
||||||
: "png?size=1024");
|
: "png?size=1024");
|
||||||
const guildUrl =
|
const guildUrl =
|
||||||
|
guildAvatar &&
|
||||||
"https://cdn.discordapp.com/guilds/" +
|
"https://cdn.discordapp.com/guilds/" +
|
||||||
guild.id +
|
guild.id +
|
||||||
"/users/" +
|
"/users/" +
|
||||||
|
@ -170,6 +171,7 @@ avatar.callback = async function (msg, line) {
|
||||||
? "gif?size=1024&_=.gif"
|
? "gif?size=1024&_=.gif"
|
||||||
: "png?size=1024");
|
: "png?size=1024");
|
||||||
const guildUrl =
|
const guildUrl =
|
||||||
|
guildAvatar &&
|
||||||
"https://cdn.discordapp.com/guilds/" +
|
"https://cdn.discordapp.com/guilds/" +
|
||||||
guild.id +
|
guild.id +
|
||||||
"/users/" +
|
"/users/" +
|
||||||
|
@ -177,7 +179,9 @@ avatar.callback = async function (msg, line) {
|
||||||
"/avatars/" +
|
"/avatars/" +
|
||||||
guildAvatar +
|
guildAvatar +
|
||||||
"." +
|
"." +
|
||||||
(guildAvatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024");
|
(guildAvatar.startsWith("a_")
|
||||||
|
? "gif?size=1024&_=.gif"
|
||||||
|
: "png?size=1024");
|
||||||
|
|
||||||
baseEmbed.description =
|
baseEmbed.description =
|
||||||
`[Normal avatar](${normalUrl})` +
|
`[Normal avatar](${normalUrl})` +
|
||||||
|
|
Loading…
Reference in a new issue