Merge branch 'autoreacts' into 'dev'
Add autoreact delete command See merge request stark-industries/jarvis/jarvis-bot!58
This commit is contained in:
commit
78604295ce
1 changed files with 18 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue