diff --git a/minato_namikaze/bot_files/cogs/developer/developer.py b/minato_namikaze/bot_files/cogs/developer/developer.py index 484879bf..35b535a1 100644 --- a/minato_namikaze/bot_files/cogs/developer/developer.py +++ b/minato_namikaze/bot_files/cogs/developer/developer.py @@ -132,7 +132,7 @@ async def sharedservers(self, ctx, *, user: discord.Member): """Get a list of servers the bot shares with the user.""" guilds = [ f"{guild.name} `{guild.id}` ({guild.member_count} members)" - for guild in [guild for guild in user.mutual_guilds] + for guild in list(user.mutual_guilds) ] await self._send_guilds(ctx, guilds, "Shared Servers") diff --git a/minato_namikaze/bot_files/cogs/img/fun.py b/minato_namikaze/bot_files/cogs/img/fun.py index 92bdf687..4e3eebd1 100644 --- a/minato_namikaze/bot_files/cogs/img/fun.py +++ b/minato_namikaze/bot_files/cogs/img/fun.py @@ -41,8 +41,7 @@ async def spank(self, ctx, member: Optional[discord.Member]): desc = f"** <@{ctx.author.id}> spanks {member.mention} !!! Damm! **" else: desc = f"** <@{ctx.author.id}> spanks themselves !!! LOL! **" - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "spank"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "spank"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) @@ -69,8 +68,7 @@ async def slap(self, ctx, member: Optional[discord.Member]): desc = f"** <@{ctx.author.id}> slaps themselves !!! LOL! **" if member == "" or random.choice([True, False]): - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "slap"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "slap"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) @@ -109,8 +107,7 @@ async def hug(self, ctx, member: Optional[discord.Member]): desc = f"** <@{ctx.author.id}> hugs {member.mention} !!! :heart: :heart: :heart: **" else: desc = f"** <@{ctx.author.id}> hugs themselves !!! :heart: :heart: :heart: :heart: **" - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "hug"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "hug"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) @@ -135,8 +132,7 @@ async def poke(self, ctx, member: Optional[discord.Member]): desc = f"** {member} <@{ctx.author.id}> pokes you !!! **" else: desc = f"** <@{ctx.author.id}> hugs themselves !!! **" - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "poke"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "poke"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) @@ -161,8 +157,7 @@ async def high5(self, ctx, member: Optional[discord.Member]): desc = f"**<@{ctx.author.id}> high fives {member.mention} !!! **" else: desc = f"**<@{ctx.author.id}> high-fives **" - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "high5"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "high5"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) @@ -186,8 +181,7 @@ async def party(self, ctx, member: Optional[discord.Member]): desc = f"**<@{ctx.author.id}> parties with {member.mention} !!! Yaay !!! **" else: desc = f"**<@{ctx.author.id}> is partying !!!**" - onlyfiles = [f for f in listdir( - join(self.DEFAULT_GIF_LIST_PATH, "party"))] + onlyfiles = list(listdir(join(self.DEFAULT_GIF_LIST_PATH, "party"))) embed = discord.Embed( description=desc, timestamp=discord.utils.utcnow()) diff --git a/minato_namikaze/bot_files/cogs/moderation/moderation.py b/minato_namikaze/bot_files/cogs/moderation/moderation.py index c63cdb83..210efe59 100644 --- a/minato_namikaze/bot_files/cogs/moderation/moderation.py +++ b/minato_namikaze/bot_files/cogs/moderation/moderation.py @@ -100,7 +100,7 @@ async def ban( @commands.guild_only() @commands.has_guild_permissions(ban_members=True) async def banlist(self, ctx, *, member: Optional[Union[str, int, discord.Member]]): - banned_users = [i for i in await ctx.guild.bans()] + banned_users = list(await ctx.guild.bans()) if not member: if len(banned_users) == 0: await ctx.send( diff --git a/minato_namikaze/bot_files/lib/classes/games/hangman.py b/minato_namikaze/bot_files/lib/classes/games/hangman.py index 945a7f34..a9c29147 100644 --- a/minato_namikaze/bot_files/lib/classes/games/hangman.py +++ b/minato_namikaze/bot_files/lib/classes/games/hangman.py @@ -121,7 +121,7 @@ def __init__(self): "z", ] self.word = random.choice(list(english_words_set)).lower() - self.letters = [l for l in self.word] + self.letters = list(self.word) self.correct = [r"\_" for __ in self.word] self.wrong_letters = [] self._embed = discord.Embed(title="HANGMAN")