feat(forums): implemented yes button for resolved command
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-09-07 18:58:25 -04:00
parent 8c858a356e
commit 67ed8aedc6
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -47,7 +47,10 @@ class Forums(commands.Cog):
@ui.button(label="Yes", style=discord.ButtonStyle.success, emoji="") @ui.button(label="Yes", style=discord.ButtonStyle.success, emoji="")
async def resolved_button_yes(self, button: ui.Button, interaction: discord.Interaction): async def resolved_button_yes(self, button: ui.Button, interaction: discord.Interaction):
channel = self.ctx.channel channel = self.ctx.channel
await interaction.response.defer()
await channel.edit(locked=True, archived=True, applied_tags=channel.applied_tags + await self.config.guild(channel.guild).forum_tag()) await channel.edit(locked=True, archived=True, applied_tags=channel.applied_tags + await self.config.guild(channel.guild).forum_tag())
await self.msg.delete()
await self.ctx.message.add_reaction("")
@commands.group(name='forumconfig', invoke_without_command=True, aliases=['forumsset']) @commands.group(name='forumconfig', invoke_without_command=True, aliases=['forumsset'])
@commands.guild_only() @commands.guild_only()