From f02fd84888530de7b07562e48f7d87e0c830c813 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 1 Sep 2023 19:56:41 -0400 Subject: [PATCH] feat(forums): added new forum_channel config option --- forums/forums.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/forums/forums.py b/forums/forums.py index 89eb2af..da48e5b 100644 --- a/forums/forums.py +++ b/forums/forums.py @@ -10,15 +10,16 @@ class Forums(commands.Cog): self.bot = bot self.config = Config.get_conf(self, identifier=2352711325) self.config.register_guild( - request_roles = [] + request_roles = [], + forum_channel = " " ) @commands.command() async def resolved(self, ctx: commands.Context): """Marks a thread as resolved.""" channel = ctx.channel - if not isinstance(channel, discord.Thread): + if isinstance(channel, discord.Thread) and channel.parent_id == await self.config.guild(ctx.guild.id).forum_channel(): + await ctx.send("Are you sure you'd like to mark this thread as resolved?") + else: await ctx.message.add_reaction("❌") return - else: - await ctx.message.add_reaction("✅")