diff --git a/.gitignore b/.gitignore index 9c8bd4e5..780a7b6b 100644 --- a/.gitignore +++ b/.gitignore @@ -133,4 +133,7 @@ dmypy.json # Pyre type checker .pyre/ -.idea \ No newline at end of file +.idea + +# Extensions +.history/ \ No newline at end of file diff --git a/minato_namikaze/bot_files/cogs/anime_and_vocaloids/anime_and_waifu.py b/minato_namikaze/bot_files/cogs/anime_and_vocaloids/anime_and_waifu.py index b8dc9af2..00abdb4e 100644 --- a/minato_namikaze/bot_files/cogs/anime_and_vocaloids/anime_and_waifu.py +++ b/minato_namikaze/bot_files/cogs/anime_and_vocaloids/anime_and_waifu.py @@ -385,7 +385,7 @@ async def whosthatpokemon(self, ctx): answer = wtp.name.lower() e = Embed(title='Who\'s That Pokemon?', timestamp=ctx.message.created_at) - e.set_footer(text=f'{ctx.message.author} reply within 30secs to answer.', icon_url=ctx.message.author.avatar_url) + e.set_footer(text=f'{ctx.message.author} reply within 30secs to answer.', icon_url=ctx.message.author.avatar.url) e.set_image(url=question) question_message = await ctx.send('You have 3 chances, **Chance: 1/3**',embed=e) diff --git a/minato_namikaze/bot_files/cogs/events/bot_events.py b/minato_namikaze/bot_files/cogs/events/bot_events.py index aca72667..e16b4b8a 100644 --- a/minato_namikaze/bot_files/cogs/events/bot_events.py +++ b/minato_namikaze/bot_files/cogs/events/bot_events.py @@ -58,7 +58,7 @@ async def on_member_join(self, member): embed.set_image(url='https://i.imgur.com/mktY446.jpeg') embed.set_thumbnail(url='https://i.imgur.com/SizgkEZ.png') embed.set_author(name=self.bot.user.name, - icon_url=self.bot.user.avatar_url) + icon_url=self.bot.user.avatar.url) embed.set_footer(text=f"Welcome {member.name}") e = Embed( @@ -122,10 +122,10 @@ async def on_guild_join(self, guild): ) e.set_author( name=self.bot.user, - icon_url=self.bot.user.avatar_url + icon_url=self.bot.user.avatar.url ) e.set_thumbnail( - url=self.bot.user.avatar_url + url=self.bot.user.avatar.url ) e.set_image( url=f"attachment://{img}" @@ -139,9 +139,9 @@ async def on_guild_join(self, guild): e34 = discord.Embed(title=f'{guild.name}', color=discord.Color.green(), description='Added') if guild.icon: - e34.set_thumbnail(url=guild.icon_url) + e34.set_thumbnail(url=guild.icon.url) if guild.banner: - e34.set_image(url=guild.banner_url_as(format="png")) + e34.set_image(url=guild.banner.with_format("png").url) c = self.bot.get_channel( 813954921782706227) if not self.bot.local else self.bot.get_channel(869238107524968479) e34.add_field(name='**Total Members**', value=guild.member_count) @@ -161,9 +161,9 @@ async def on_guild_remove(self, guild): try: e34 = ErrorEmbed(title=f'{guild.name}', description='Left') if guild.icon: - e34.set_thumbnail(url=guild.icon_url) + e34.set_thumbnail(url=guild.icon.url) if guild.banner: - e34.set_image(url=guild.banner_url_as(format="png")) + e34.set_image(url=guild.banner.with_format("png").url) c = self.bot.get_channel( 813954921782706227) if not self.bot.local else self.bot.get_channel(869238107524968479) e34.add_field(name='**Total Members**', value=guild.member_count) @@ -197,8 +197,8 @@ async def on_member_ban(self, guild, user): value=event.user, inline=True) if event.reason: e.add_field(name='**Reason** :', value=event.reason) - if user.avatar_url: - e.set_thumbnail(url=user.avatar_url) + if user.avatar.url: + e.set_thumbnail(url=user.avatar.url) await ban.send(embed=e) try: await user.send(f'You were **banned** from **{guild.name}**', embed=e) @@ -219,8 +219,8 @@ async def on_member_unban(self, guild, user): title='**Unban** :tada:', description=f'**{user.mention}** was unbanned! :tada:' ) - if user.avatar_url: - e.set_thumbnail(url=user.avatar_url) + if user.avatar.url: + e.set_thumbnail(url=user.avatar.url) e.add_field(name='**Unbanned User** :', value=user, inline=True) if event: e.add_field(name='**Responsible Moderator** :', diff --git a/minato_namikaze/bot_files/cogs/events/cmd_error.py b/minato_namikaze/bot_files/cogs/events/cmd_error.py index df18af97..2f14373b 100644 --- a/minato_namikaze/bot_files/cogs/events/cmd_error.py +++ b/minato_namikaze/bot_files/cogs/events/cmd_error.py @@ -222,7 +222,7 @@ async def on_command_error(self, ctx, error): return c = self.bot.get_channel(830366314761420821) - haaha = ctx.author.avatar_url + haaha = ctx.author.avatar.url e9 = ErrorEmbed( title="Oh no there was some error", description=f"`{error}`") e9.add_field(name="**Command Error Caused By**", @@ -238,9 +238,9 @@ async def on_command_error(self, ctx, error): e = Embed( title=f'In **{ctx.guild.name}**', description=f'User affected {ctx.message.author}') if ctx.guild.icon: - e.set_thumbnail(url=ctx.guild.icon_url) + e.set_thumbnail(url=ctx.guild.icon.url) if ctx.guild.banner: - e.set_image(url=ctx.guild.banner_url_as(format="png")) + e.set_image(url=ctx.guild.banner.with_format("png").url) e.add_field(name='**Total Members**', value=ctx.guild.member_count) e.add_field( name='**Bots**', value=sum(1 for member in ctx.guild.members if member.bot)) diff --git a/minato_namikaze/bot_files/cogs/events/votes.py b/minato_namikaze/bot_files/cogs/events/votes.py index d292eef9..17160e76 100644 --- a/minato_namikaze/bot_files/cogs/events/votes.py +++ b/minato_namikaze/bot_files/cogs/events/votes.py @@ -41,7 +41,7 @@ async def hasvoted(self, ctx, member: Optional[Union[int, discord.Member]] = Non title=f'{member.display_name} vote stats for me', description=f'{member.mention} here your voting stats for last 12hours' ) - e.set_thumbnail(url=member.avatar_url) + e.set_thumbnail(url=member.avatar.url) a = requests.get( f'https://top.gg/api/bots/{self.bot.user.id}/check', params={'userId': member.id}, diff --git a/minato_namikaze/bot_files/cogs/fun/random.py b/minato_namikaze/bot_files/cogs/fun/random.py index 0707164e..09a8adb3 100644 --- a/minato_namikaze/bot_files/cogs/fun/random.py +++ b/minato_namikaze/bot_files/cogs/fun/random.py @@ -63,7 +63,7 @@ async def owoify(self, ctx, text): async def magic(self, ctx, user: discord.Member = None): '''See magic!''' user = user or ctx.author - url = str(user.avatar_url_as(format="png", size=1024)) + url = str(user.avatar.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.magik(), url) e2file = discord.File(fp=img.image, filename=f"magik.{img.format}") e = Embed(title="Magik!") diff --git a/minato_namikaze/bot_files/cogs/img/fun.py b/minato_namikaze/bot_files/cogs/img/fun.py index 29a9dcba..ef9e5f1e 100644 --- a/minato_namikaze/bot_files/cogs/img/fun.py +++ b/minato_namikaze/bot_files/cogs/img/fun.py @@ -43,7 +43,7 @@ async def spank(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'spank'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File(join(self.DEFAULT_GIF_LIST_PATH, @@ -70,7 +70,7 @@ async def slap(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'slap'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File( @@ -79,8 +79,8 @@ async def slap(self, ctx, member: discord.Member = ''): await ctx.send(file=file, embed=embed) else: user = member - url = str(user.avatar_url_as(format="png", size=1024)) - img = await self.bot.dagpi.image_process(ImageFeatures.slap(), url2=str(ctx.author.avatar_url_as(format="png", size=1024)), url=url) + url = str(user.avatar.with_format("png").with_size(1024)) + img = await self.bot.dagpi.image_process(ImageFeatures.slap(), url2=str(ctx.author.with_format("png").with_size(1024).url), url=url) e2file = discord.File(fp=img.image, filename=f"slap.{img.format}") e = discord.Embed(description=desc) e.set_image(url=f"attachment://slap.{img.format}") @@ -103,7 +103,7 @@ async def hug(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'hug'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File(join(self.DEFAULT_GIF_LIST_PATH, @@ -128,7 +128,7 @@ async def poke(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'poke'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File(join(self.DEFAULT_GIF_LIST_PATH, @@ -153,7 +153,7 @@ async def high5(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'high5'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File(join(self.DEFAULT_GIF_LIST_PATH, @@ -177,7 +177,7 @@ async def party(self, ctx, member: discord.Member = ''): join(self.DEFAULT_GIF_LIST_PATH, 'party'))] embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) image_name = random.choice(onlyfiles) file = discord.File(join(self.DEFAULT_GIF_LIST_PATH, @@ -191,7 +191,7 @@ async def pat(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.petpet(), url) e2file = discord.File(fp=img.image, filename=f"petpet.{img.format}") e = discord.Embed(title="UwU Pat!") diff --git a/minato_namikaze/bot_files/cogs/img/img.py b/minato_namikaze/bot_files/cogs/img/img.py index 4f17a976..a045d9d9 100644 --- a/minato_namikaze/bot_files/cogs/img/img.py +++ b/minato_namikaze/bot_files/cogs/img/img.py @@ -40,7 +40,7 @@ async def wni(self, ctx, *, member: discord.Member = ''): file = discord.File(file_path) embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) embed.set_image(url=f"attachment://{file_path}") await ctx.send(file=file, embed=embed) @@ -62,7 +62,7 @@ async def wi(self, ctx, *, member: discord.Member = ''): return embed = discord.Embed( - description=desc, timestamp=datetime.datetime.utcnow()) + description=desc, timestamp=discord.utils.utcnow()) img = Image.open(FileIO(self.DEFAULT_GIF_LIST_PATH / os.path.join("amongus.png"))) @@ -82,7 +82,7 @@ async def triggered(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.triggered(), url) e2file = discord.File(fp=img.image, filename=f"triggered.{img.format}") e = discord.Embed(title="Here You Go! Filter used is triggered!") @@ -97,7 +97,7 @@ async def message(self, ctx, member: discord.Member = None, *, text): uname = member.display_name text = str(text) - pfp = str(member.avatar_url_as(format="png", size=1024)) + pfp = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.discord(), url=pfp, username=uname, @@ -118,7 +118,7 @@ async def captcha(self, ctx, member: discord.Member = None, *, text='Detect Face if textaslen > 13: await ctx.send("Maybe text length something smaller then 13?") else: - pfp = str(member.avatar_url_as(format="png", size=1024)) + pfp = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.captcha(), url=pfp, text=text) @@ -134,7 +134,7 @@ async def pixel(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.pixel(), url) e2file = discord.File(fp=img.image, filename=f"pixel.{img.format}") e = discord.Embed(title="Here You Go! Filter used is pixel!") @@ -146,7 +146,7 @@ async def jail(self, ctx, member: discord.Member = None): """Jail yourself or someone""" if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.jail(), url=url) e2file = discord.File(fp=img.image, filename=f"jail.{img.format}") e = discord.Embed(title="Here You Go! Filter used is jail!") @@ -159,7 +159,7 @@ async def wanted(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.wanted(), url) e2file = discord.File(fp=img.image, filename=f"wanted.{img.format}") e = discord.Embed(title="Here You Go! Filter used is wanted!") @@ -172,7 +172,7 @@ async def rainbow(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.gay(), url) e2file = discord.File(fp=img.image, filename=f"rainbow.{img.format}") e = discord.Embed(title="Here You Go! Filter used is gay!") @@ -185,7 +185,7 @@ async def gay(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.gay(), url) e2file = discord.File(fp=img.image, filename=f"gay.{img.format}") e = discord.Embed(title="There you go gay!") @@ -198,7 +198,7 @@ async def trash(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=512)) + url = str(member.with_format("png").with_size(512).url) img = await self.bot.dagpi.image_process(ImageFeatures.trash(), url) e2file = discord.File(fp=img.image, filename=f"trash.{img.format}") e = discord.Embed(title="There you go piece of Trash!") @@ -211,7 +211,7 @@ async def delete(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.delete(), url) e2file = discord.File(fp=img.image, filename=f"delete.{img.format}") e = discord.Embed(title="There you go piece of trash removed!") @@ -224,7 +224,7 @@ async def angel(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=512)) + url = str(member.with_format("png").with_size(512).url) img = await self.bot.dagpi.image_process(ImageFeatures.angel(), url) e2file = discord.File(fp=img.image, filename=f"angel.{img.format}") e = discord.Embed(title="Our dear Angel!") @@ -237,7 +237,7 @@ async def satan(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=64)) + url = str(member.with_format("png").with_size(64).url) img = await self.bot.dagpi.image_process(ImageFeatures.satan(), url) e2file = discord.File(fp=img.image, filename=f"satan.{img.format}") e = discord.Embed(title="Satan!!!") @@ -250,7 +250,7 @@ async def charcoal(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.charcoal(), url) e2file = discord.File(fp=img.image, filename=f"charcoal.{img.format}") e = discord.Embed(title="There you go your lovely charcoal paintaing") @@ -263,7 +263,7 @@ async def hitler(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=64)) + url = str(member.with_format("png").with_size(64).url) img = await self.bot.dagpi.image_process(ImageFeatures.hitler(), url) e2file = discord.File(fp=img.image, filename=f"hitler.{img.format}") e = discord.Embed(title="Worse than Hitler!!!") @@ -276,7 +276,7 @@ async def wasted(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.wasted(), url) e2file = discord.File(fp=img.image, filename=f"wasted.{img.format}") e = discord.Embed(title="Wasted! :skull_crossbones:") @@ -290,7 +290,7 @@ async def bomb(self, ctx, member: discord.Member = None): if member is None: member = ctx.author - url = str(member.avatar_url_as(format="png", size=1024)) + url = str(member.with_format("png").with_size(1024).url) img = await self.bot.dagpi.image_process(ImageFeatures.bomb(), url) e2file = discord.File(fp=img.image, filename=f"wasted.{img.format}") e.set_image(url=f"attachment://bomb.{img.format}") diff --git a/minato_namikaze/bot_files/cogs/info/mysupport.py b/minato_namikaze/bot_files/cogs/info/mysupport.py index e4b6fabc..be77bda2 100644 --- a/minato_namikaze/bot_files/cogs/info/mysupport.py +++ b/minato_namikaze/bot_files/cogs/info/mysupport.py @@ -103,7 +103,7 @@ async def inviteme(self, ctx): '''Generates my invite link for your server''' embed = discord.Embed( title='**Invite Link**', description=f'[My Invite Link!](https://discord.com/oauth2/authorize?client_id=779559821162315787&permissions=8&redirect_uri=https%3A%2F%2Fminatonamikaze-invites.herokuapp.com%2Finvite&scope=applications.commands%20bot&response_type=code&state=cube12345%3F%2FDirect%20From%20Bot)') - embed.set_thumbnail(url=ctx.bot.user.avatar_url) + embed.set_thumbnail(url=ctx.bot.user.avatar.url) await ctx.send(embed=embed) @commands.command(description='Generates my support server invite') diff --git a/minato_namikaze/bot_files/cogs/info/serverinfo.py b/minato_namikaze/bot_files/cogs/info/serverinfo.py index bd6034ac..6f0595c8 100644 --- a/minato_namikaze/bot_files/cogs/info/serverinfo.py +++ b/minato_namikaze/bot_files/cogs/info/serverinfo.py @@ -36,9 +36,9 @@ async def serverdump(self, ctx): e = discord.Embed( title=f'In **{guild.name}**', description='Was added', color=discord.Color.green()) if guild.icon: - e.set_thumbnail(url=guild.icon_url) + e.set_thumbnail(url=guild.icon.url) if guild.banner: - e.set_image(url=guild.banner_url_as(format="png")) + e.set_image(url=guild.banner.with_format("png").url) n += 1 e.add_field(name='**Total Members**', value=guild.member_count) e.add_field( @@ -54,9 +54,9 @@ async def serverdump(self, ctx): e = discord.Embed( title=f'In **{ctx.guild.name}**', description=f'Bumped by **{ctx.message.author}**', color=0x2ecc71) if ctx.guild.icon: - e.set_thumbnail(url=ctx.guild.icon_url) + e.set_thumbnail(url=ctx.guild.icon.url) if ctx.guild.banner: - e.set_image(url=ctx.guild.banner_url_as(format="png")) + e.set_image(url=ctx.guild.banner.with_format("png").url) e.add_field(name='**Total Members**', value=ctx.guild.member_count) e.add_field( name='**Bots**', value=sum(1 for member in ctx.guild.members if member.bot)) @@ -89,7 +89,7 @@ async def avatar(self, ctx, *, user: discord.Member = None): """ Get the avatar of you or someone else """ user = user or ctx.author e = discord.Embed(title=f"Avatar for {user.name}") - e.set_image(url=user.avatar_url) + e.set_image(url=user.avatar.url) await ctx.send(embed=e) @commands.command() @@ -101,7 +101,7 @@ async def joinedat(self, ctx, *, user: discord.Member = None): embed = discord.Embed( title=f'**{user}**', description=f'{user} joined **{ctx.guild.name}** at \n{user.joined_at}') - embed.set_image(url=user.avatar_url) + embed.set_image(url=user.avatar.url) await ctx.send(embed=embed) @commands.group() @@ -115,9 +115,9 @@ async def server(self, ctx): title=f"ℹ Information About **{ctx.guild.name}**", description=None) if ctx.guild.icon: - embed.set_thumbnail(url=ctx.guild.icon_url) + embed.set_thumbnail(url=ctx.guild.icon.url) if ctx.guild.banner: - embed.set_image(url=ctx.guild.banner_url_as(format="png")) + embed.set_image(url=ctx.guild.banner.with_format("png").url) embed.add_field(name="**Server Name**", value=ctx.guild.name, inline=True) @@ -138,7 +138,7 @@ async def server_icon(self, ctx): """ Get the current server icon """ if not ctx.guild.icon: return await ctx.send("This server does not have a avatar...") - await ctx.send(f"Avatar of **{ctx.guild.name}**\n{ctx.guild.icon_url_as(size=1024)}") + await ctx.send(f"Avatar of **{ctx.guild.name}**\n{ctx.guild.icon.with_size(1024).url}") @server.command(name="banner") @commands.guild_only() @@ -147,7 +147,7 @@ async def server_banner(self, ctx): if not ctx.guild.banner: return await ctx.send("This server does not have a banner...") e = Embed(title=f"ℹ Banner for {ctx.guild}") - e.set_image(url=ctx.guild.banner_url_as(format='png')) + e.set_image(url=ctx.guild.banner.with_format("png").url) await ctx.send(embed=e) @commands.command(aliases=['whois','who']) @@ -163,7 +163,7 @@ async def user(self, ctx, *, user: discord.Member = None): content2 = f"ℹ About **{user.id}**" embed = discord.Embed( title=content2, colour=user.top_role.colour.value) - embed.set_thumbnail(url=user.avatar_url) + embed.set_thumbnail(url=user.avatar.url) embed.add_field(name="Full name", value=user, inline=True) embed.add_field(name="Nickname", value=user.nick if hasattr( diff --git a/minato_namikaze/bot_files/cogs/info/snipe.py b/minato_namikaze/bot_files/cogs/info/snipe.py index e7bd5698..d6313e9c 100644 --- a/minato_namikaze/bot_files/cogs/info/snipe.py +++ b/minato_namikaze/bot_files/cogs/info/snipe.py @@ -99,7 +99,7 @@ async def snipe(self, ctx): if type(snipe) == list: # edit snipe emb.set_author( name=str(snipe[0].author), - icon_url=snipe[0].author.avatar_url) + icon_url=snipe[0].author.avatar.url) emb.colour = snipe[0].author.colour emb.add_field( name='Before', @@ -113,13 +113,13 @@ async def snipe(self, ctx): else: # delete snipe emb.set_author( name=str(snipe.author), - icon_url=snipe.author.avatar_url) + icon_url=snipe.author.avatar.url) emb.description = self.sanitise(snipe.content) emb.colour = snipe.author.colour emb.timestamp = snipe.created_at emb.set_footer( text=f'Message sniped by {str(ctx.author)}', - icon_url=ctx.author.avatar_url) + icon_url=ctx.author.avatar.url) await ctx.send(embed=emb) self.snipes[ctx.channel.id] = None diff --git a/minato_namikaze/bot_files/cogs/moderation/moderation.py b/minato_namikaze/bot_files/cogs/moderation/moderation.py index 2c4c7d93..392eda05 100644 --- a/minato_namikaze/bot_files/cogs/moderation/moderation.py +++ b/minato_namikaze/bot_files/cogs/moderation/moderation.py @@ -145,7 +145,7 @@ async def banlist(self, ctx, *, member: Optional[Union[str, int, discord.Member] value=i+1, inline=True) e.add_field(name='**Banned User Name**', value=ban_entry.user, inline=True) - e.set_thumbnail(url=ban_entry.user.avatar_url) + e.set_thumbnail(url=ban_entry.user.avatar.url) await ctx.channel.send(embed=e) n += 1 return @@ -159,7 +159,7 @@ async def banlist(self, ctx, *, member: Optional[Union[str, int, discord.Member] value=i+1, inline=True) e.add_field(name='**Banned User Name**', value=ban_entry.user, inline=True) - e.set_thumbnail(url=ban_entry.user.avatar_url) + e.set_thumbnail(url=ban_entry.user.avatar.url) await ctx.channel.send(embed=e) n += 1 return @@ -173,7 +173,7 @@ async def banlist(self, ctx, *, member: Optional[Union[str, int, discord.Member] value=i+1, inline=True) e.add_field(name='**Banned User Name**', value=ban_entry.user, inline=True) - e.set_thumbnail(url=ban_entry.user.avatar_url) + e.set_thumbnail(url=ban_entry.user.avatar.url) await ctx.channel.send(embed=e) n += 1 return