fix errors for guilds with no icon

This commit is contained in:
derpystuff 2023-04-23 15:10:47 +02:00
parent 615fd4bc82
commit 27bc88ea15
3 changed files with 14 additions and 7 deletions

View file

@ -13,7 +13,8 @@ module.exports = {
},
run: async (context) => {
context.triggerTyping();
editOrReply(context, {
if(!context.guild.iconUrl) return editOrReply(context, createEmbed("warning", context, "Server doesn't have an icon."))
return editOrReply(context, {
embeds: [createEmbed("default", context, {
image: {
url: context.guild.iconUrl + "?size=4096"