diff --git a/jarvis/cogs/autoreact.py b/jarvis/cogs/autoreact.py index 221a468..bc2dba5 100644 --- a/jarvis/cogs/autoreact.py +++ b/jarvis/cogs/autoreact.py @@ -178,6 +178,24 @@ class AutoReactCog(Extension): await self.delete_autoreact(ctx, channel) await ctx.send(f"Removed {emote} from {channel.mention} autoreact.") + @autoreact.subcommand( + sub_cmd_name="delete", + sub_cmd_description="Delete an autoreact", + ) + @slash_option( + name="channel", + description="Channel to remove autoreact from", + opt_type=OptionTypes.CHANNEL, + required=True, + ) + @check(admin_or_permissions(Permissions.MANAGE_GUILD)) + async def _autoreact_delete(self, ctx: InteractionContext, channel: GuildText) -> None: + result = self.delete_autoreact(ctx, channel) + if not result: + await ctx.send(f"No autoreact found in {channel.mention}", ephemeral=True) + else: + await ctx.send(f"Autoreact removed from {channel.mention}") + @autoreact.subcommand( sub_cmd_name="list", sub_cmd_description="List all autoreacts on a channel",