@@ -160,15 +160,15 @@ async def snippet(self, ctx, *, name: str.lower = None):
160
160
color = self .bot .error_color , description = "You dont have any snippets at the moment."
161
161
)
162
162
embed .set_footer (text = f'Check "{ self .bot .prefix } help snippet add" to add a snippet.' )
163
- embed .set_author (name = "Snippets" , icon_url = ctx . guild . icon . url )
163
+ embed .set_author (name = "Snippets" , icon_url = self . bot . get_guild_icon ( guild = ctx . guild ) )
164
164
return await ctx .send (embed = embed )
165
165
166
166
embeds = []
167
167
168
168
for i , names in enumerate (zip_longest (* (iter (sorted (self .bot .snippets )),) * 15 )):
169
169
description = format_description (i , names )
170
170
embed = discord .Embed (color = self .bot .main_color , description = description )
171
- embed .set_author (name = "Snippets" , icon_url = ctx . guild . icon . url )
171
+ embed .set_author (name = "Snippets" , icon_url = self . bot . get_guild_icon ( guild = ctx . guild ) )
172
172
embeds .append (embed )
173
173
174
174
session = EmbedPaginatorSession (ctx , * embeds )
@@ -1031,7 +1031,7 @@ async def anonadduser(self, ctx, *users_arg: Union[discord.Member, discord.Role,
1031
1031
name = tag
1032
1032
avatar_url = self .bot .config ["anon_avatar_url" ]
1033
1033
if avatar_url is None :
1034
- avatar_url = self .bot .guild . icon . url
1034
+ avatar_url = self .bot .get_guild_icon ( guild = ctx . guild )
1035
1035
em .set_footer (text = name , icon_url = avatar_url )
1036
1036
1037
1037
for u in users :
@@ -1120,7 +1120,7 @@ async def anonremoveuser(self, ctx, *users_arg: Union[discord.Member, discord.Ro
1120
1120
name = tag
1121
1121
avatar_url = self .bot .config ["anon_avatar_url" ]
1122
1122
if avatar_url is None :
1123
- avatar_url = self .bot .guild . icon . url
1123
+ avatar_url = self .bot .get_guild_icon ( guild = ctx . guild )
1124
1124
em .set_footer (text = name , icon_url = avatar_url )
1125
1125
1126
1126
for u in users :
@@ -1200,7 +1200,7 @@ async def logs_closed_by(self, ctx, *, user: User = None):
1200
1200
user = user if user is not None else ctx .author
1201
1201
1202
1202
entries = await self .bot .api .search_closed_by (user .id )
1203
- embeds = self .format_log_embeds (entries , avatar_url = self .bot .guild . icon . url )
1203
+ embeds = self .format_log_embeds (entries , avatar_url = self .bot .get_guild_icon ( guild = ctx . guild ) )
1204
1204
1205
1205
if not embeds :
1206
1206
embed = discord .Embed (
@@ -1250,7 +1250,7 @@ async def logs_responded(self, ctx, *, user: User = None):
1250
1250
1251
1251
entries = await self .bot .api .get_responded_logs (user .id )
1252
1252
1253
- embeds = self .format_log_embeds (entries , avatar_url = self .bot .guild . icon . url )
1253
+ embeds = self .format_log_embeds (entries , avatar_url = self .bot .get_guild_icon ( guild = ctx . guild ) )
1254
1254
1255
1255
if not embeds :
1256
1256
embed = discord .Embed (
@@ -1275,7 +1275,7 @@ async def logs_search(self, ctx, limit: Optional[int] = None, *, query):
1275
1275
1276
1276
entries = await self .bot .api .search_by_text (query , limit )
1277
1277
1278
- embeds = self .format_log_embeds (entries , avatar_url = self .bot .guild . icon . url )
1278
+ embeds = self .format_log_embeds (entries , avatar_url = self .bot .get_guild_icon ( guild = ctx . guild ) )
1279
1279
1280
1280
if not embeds :
1281
1281
embed = discord .Embed (
0 commit comments