mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 12:29:30 +02:00
Return None when guild has no icon
This commit is contained in:
@@ -32,5 +32,7 @@ class Guild(object):
|
||||
|
||||
@property
|
||||
def icon_url(self):
|
||||
"""A property returning direct URL to the guild's icon."""
|
||||
"""A property returning direct URL to the guild's icon. Returns None if guild has no icon set."""
|
||||
if not self.icon_hash:
|
||||
return
|
||||
return configs.GUILD_ICON_BASE_URL.format(guild_id=self.id, icon_hash=self.icon_hash)
|
||||
|
||||
Reference in New Issue
Block a user