(moderation): tickets command and note ticket.

Add new `tickets` command for viewing moderation tickets.
Add `Note` ticket implementation, with command.
Add `offer_delete` context utility.
Add `guild_moderator` command ward.
This commit is contained in:
2021-09-29 23:26:14 +03:00
parent ca442ea319
commit 6a2da9c483
7 changed files with 487 additions and 0 deletions

View File

@@ -22,3 +22,14 @@ def is_guild_admin(member):
)
async def guild_admin(ctx, *args, **kwargs):
return is_guild_admin(ctx.author)
@check(
name="MODERATOR",
msg=("You need to be a server moderator to do this!"),
requires=[in_guild],
parents=(guild_admin,)
)
async def guild_moderator(ctx, *args, **kwargs):
modrole = ctx.guild_settings.mod_role.value
return (modrole and (modrole in ctx.author.roles))