Skip to content

Commit bcaa85f

Browse files
Update general-slash.py
Bot errors when there is no server icon present.
1 parent 4cb7919 commit bcaa85f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cogs/slash/general-slash.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ async def serverinfo(self, interaction: ApplicationCommandInteraction) -> None:
7979
description=f"{interaction.guild}",
8080
color=0x9C84EF
8181
)
82-
embed.set_thumbnail(
83-
url=interaction.guild.icon.url
84-
)
82+
if interaction.guild.icon is not None:
83+
embed.set_thumbnail(
84+
url=interaction.guild.icon.url
85+
)
8586
embed.add_field(
8687
name="Server ID",
8788
value=interaction.guild.id

0 commit comments

Comments
 (0)