utility.banner: guild error handling

This commit is contained in:
Cynthia Foxwell 2021-08-31 09:49:21 -06:00
parent c3e94cd593
commit a066ab27c1

View file

@ -175,6 +175,9 @@ banner.callback = async function (msg, line) {
return "`--server/--guild` can only be used within guilds.";
} else {
const guild = msg.channel.guild || hf.bot.guilds.get(msg.guildID);
if (!guild.banner) return "This guild does not have a banner.";
const url = `${BANNER_BASE}${guild.id}/${guild.banner}.${
guild.banner.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
}`;