2020-10-13 21:02:40 +02:00
|
|
|
from discord.ext import commands
|
|
|
|
from functions import checks
|
|
|
|
|
|
|
|
|
|
|
|
class TestCog(commands.Cog):
|
|
|
|
|
|
|
|
def __init__(self, client):
|
|
|
|
self.client = client
|
|
|
|
|
|
|
|
def cog_check(self, ctx):
|
2020-12-23 00:35:47 +01:00
|
|
|
"""
|
|
|
|
Check executed for every command in this cog.
|
|
|
|
|
|
|
|
If necessary, create your own check here. A check is just a function
|
|
|
|
that returns True or False, and takes ctx as an argument. A command will
|
|
|
|
only be executed when this check returns True, which is why that is the default
|
|
|
|
implementation for this function.
|
|
|
|
"""
|
|
|
|
return True
|
2020-10-13 21:02:40 +02:00
|
|
|
|
|
|
|
@commands.command()
|
|
|
|
async def test(self, ctx):
|
|
|
|
pass
|
|
|
|
|
2020-11-29 19:20:55 +01:00
|
|
|
@test.error
|
|
|
|
async def test_handler(self, ctx, error):
|
|
|
|
raise error
|
|
|
|
|
2020-10-13 21:02:40 +02:00
|
|
|
|
|
|
|
def setup(client):
|
|
|
|
client.add_cog(TestCog(client))
|