feat(forums): implemented yes button for resolved command
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
8c858a356e
commit
67ed8aedc6
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue