feat(forums): added new forum_channel config option
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
663d71831d
commit
f02fd84888
1 changed files with 5 additions and 4 deletions
|
@ -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("✅")
|
|
||||||
|
|
Loading…
Reference in a new issue