feat(forums): added new forum_channel config option
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-09-01 19:56:41 -04:00
parent 663d71831d
commit f02fd84888
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -10,15 +10,16 @@ class Forums(commands.Cog):
self.bot = bot self.bot = bot
self.config = Config.get_conf(self, identifier=2352711325) self.config = Config.get_conf(self, identifier=2352711325)
self.config.register_guild( self.config.register_guild(
request_roles = [] request_roles = [],
forum_channel = " "
) )
@commands.command() @commands.command()
async def resolved(self, ctx: commands.Context): async def resolved(self, ctx: commands.Context):
"""Marks a thread as resolved.""" """Marks a thread as resolved."""
channel = ctx.channel 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("") await ctx.message.add_reaction("")
return return
else:
await ctx.message.add_reaction("")