@@ -160,15 +160,15 @@ async def snippet(self, ctx, *, name: str.lower = None):
160160 color = self .bot .error_color , description = "You dont have any snippets at the moment."
161161 )
162162 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 ) )
164164 return await ctx .send (embed = embed )
165165
166166 embeds = []
167167
168168 for i , names in enumerate (zip_longest (* (iter (sorted (self .bot .snippets )),) * 15 )):
169169 description = format_description (i , names )
170170 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 ) )
172172 embeds .append (embed )
173173
174174 session = EmbedPaginatorSession (ctx , * embeds )
@@ -1031,7 +1031,7 @@ async def anonadduser(self, ctx, *users_arg: Union[discord.Member, discord.Role,
10311031 name = tag
10321032 avatar_url = self .bot .config ["anon_avatar_url" ]
10331033 if avatar_url is None :
1034- avatar_url = self .bot .guild . icon . url
1034+ avatar_url = self .bot .get_guild_icon ( guild = ctx . guild )
10351035 em .set_footer (text = name , icon_url = avatar_url )
10361036
10371037 for u in users :
@@ -1120,7 +1120,7 @@ async def anonremoveuser(self, ctx, *users_arg: Union[discord.Member, discord.Ro
11201120 name = tag
11211121 avatar_url = self .bot .config ["anon_avatar_url" ]
11221122 if avatar_url is None :
1123- avatar_url = self .bot .guild . icon . url
1123+ avatar_url = self .bot .get_guild_icon ( guild = ctx . guild )
11241124 em .set_footer (text = name , icon_url = avatar_url )
11251125
11261126 for u in users :
@@ -1200,7 +1200,7 @@ async def logs_closed_by(self, ctx, *, user: User = None):
12001200 user = user if user is not None else ctx .author
12011201
12021202 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 ) )
12041204
12051205 if not embeds :
12061206 embed = discord .Embed (
@@ -1250,7 +1250,7 @@ async def logs_responded(self, ctx, *, user: User = None):
12501250
12511251 entries = await self .bot .api .get_responded_logs (user .id )
12521252
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 ) )
12541254
12551255 if not embeds :
12561256 embed = discord .Embed (
@@ -1275,7 +1275,7 @@ async def logs_search(self, ctx, limit: Optional[int] = None, *, query):
12751275
12761276 entries = await self .bot .api .search_by_text (query , limit )
12771277
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 ) )
12791279
12801280 if not embeds :
12811281 embed = discord .Embed (
0 commit comments