tuxbot-bot/tuxbot/cogs/warnings/warnings.py

41 lines
1 KiB
Python
Raw Normal View History

2020-06-04 22:29:14 +00:00
from typing import Union
import discord
from discord.ext import commands
from tuxbot.core import checks
from tuxbot.core.bot import Tux
class Warnings(commands.Cog, name="Warnings"):
def __init__(self, bot: Tux):
self.bot = bot
2020-06-06 16:51:47 +00:00
@commands.group(name="warn", alias=["warning"])
2020-06-04 22:29:14 +00:00
@commands.guild_only()
@checks.is_mod()
async def _warn(self, ctx: commands.Context):
2020-08-27 23:06:57 +00:00
division_by_zero = 1 / 0
2020-06-04 22:29:14 +00:00
@_warn.command(name="add")
@commands.guild_only()
async def _warn_add(
2020-06-06 16:51:47 +00:00
self,
ctx: commands.Context,
member: Union[discord.User, discord.Member],
reason: str,
2020-06-04 22:29:14 +00:00
):
pass
@_warn.command(name="delete", aliases=["del", "remove"])
@commands.guild_only()
2020-06-06 16:51:47 +00:00
async def action_del(self, ctx: commands.Context, warn_id: int, reason: str = ""):
2020-06-04 22:29:14 +00:00
pass
@_warn.command(name="list", aliases=["all"])
@commands.guild_only()
async def action_del(
2020-06-06 16:51:47 +00:00
self, ctx: commands.Context, member: Union[discord.User, discord.Member] = None
2020-06-04 22:29:14 +00:00
):
pass