tldr: core, warn's skeleton
This commit is contained in:
parent
b5b7f0c7ef
commit
815709d68b
17 changed files with 328 additions and 106 deletions
tuxbot/cogs/warnings
6
tuxbot/cogs/warnings/__init__.py
Normal file
6
tuxbot/cogs/warnings/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from .warnings import Warnings
|
||||
from ...core.bot import Tux
|
||||
|
||||
|
||||
def setup(bot: Tux):
|
||||
bot.add_cog(Warnings(bot))
|
47
tuxbot/cogs/warnings/warnings.py
Normal file
47
tuxbot/cogs/warnings/warnings.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
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
|
||||
|
||||
@commands.group(name='warn', alias=['warning'])
|
||||
@commands.guild_only()
|
||||
@checks.is_mod()
|
||||
async def _warn(self, ctx: commands.Context):
|
||||
pass
|
||||
|
||||
@_warn.command(name="add")
|
||||
@commands.guild_only()
|
||||
async def _warn_add(
|
||||
self,
|
||||
ctx: commands.Context,
|
||||
member: Union[discord.User, discord.Member],
|
||||
reason: str
|
||||
):
|
||||
pass
|
||||
|
||||
@_warn.command(name="delete", aliases=["del", "remove"])
|
||||
@commands.guild_only()
|
||||
async def action_del(
|
||||
self,
|
||||
ctx: commands.Context,
|
||||
warn_id: int,
|
||||
reason: str = ""
|
||||
):
|
||||
pass
|
||||
|
||||
@_warn.command(name="list", aliases=["all"])
|
||||
@commands.guild_only()
|
||||
async def action_del(
|
||||
self,
|
||||
ctx: commands.Context,
|
||||
member: Union[discord.User, discord.Member] = None
|
||||
):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue