diff --git a/cogs/text_service_cog.py b/cogs/text_service_cog.py index 6a71141..25a6221 100644 --- a/cogs/text_service_cog.py +++ b/cogs/text_service_cog.py @@ -223,7 +223,8 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): channel_ids = self.conversation_thread_owners[normalized_user_id] if ctx.channel.id not in channel_ids: await ctx.reply( - "This is not a conversation thread that you own!", delete_after=5 + "This is not a conversation thread that you own!", + delete_after=5, ) except Exception: @@ -267,9 +268,13 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): if conversation_limit: try: owner_id = list(self.conversation_thread_owners.keys())[ - list([value for value in self.conversation_thread_owners.values()]).index(channel_id) + list( + [value for value in self.conversation_thread_owners.values()] + ).index(channel_id) ] - self.conversation_thread_owners[normalized_user_id].remove(ctx.channel.id) + self.conversation_thread_owners[normalized_user_id].remove( + ctx.channel.id + ) # Attempt to close and lock the thread. try: thread = await self.bot.fetch_channel(channel_id) @@ -282,7 +287,9 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): else: if normalized_user_id in self.conversation_thread_owners: thread_id = ctx.channel.id - self.conversation_thread_owners[normalized_user_id].remove(ctx.channel.id) + self.conversation_thread_owners[normalized_user_id].remove( + ctx.channel.id + ) # Attempt to close and lock the thread. try: diff --git a/services/text_service.py b/services/text_service.py index e92833f..9cca096 100644 --- a/services/text_service.py +++ b/services/text_service.py @@ -797,8 +797,8 @@ class EndConvoButton(discord.ui.Button["ConversationView"]): user_id = interaction.user.id if ( user_id in self.converser_cog.conversation_thread_owners - and interaction.channel.id in self.converser_cog.conversation_thread_owners[user_id] - + and interaction.channel.id + in self.converser_cog.conversation_thread_owners[user_id] ): try: await self.converser_cog.end_conversation(