Added logic to handle commands

This commit is contained in:
2022-07-16 15:45:34 +02:00
parent fb35e8b8b2
commit 10d33e5d1d
13 changed files with 190 additions and 62 deletions

View File

@@ -0,0 +1,12 @@
from abc import ABC, abstractmethod
from discord.ext.commands import Context
class OnCommandABC(ABC):
@abstractmethod
def __init__(self): pass
@abstractmethod
async def on_command(self, ctx: Context): pass

View File

@@ -0,0 +1,12 @@
from abc import ABC, abstractmethod
from discord.ext.commands import Context, CommandError
class OnCommandCompletionABC(ABC):
@abstractmethod
def __init__(self): pass
@abstractmethod
async def on_command_completion(self, ctx: Context): pass

View File

@@ -0,0 +1,12 @@
from abc import ABC, abstractmethod
from discord.ext.commands import Context, CommandError
class OnCommandErrorABC(ABC):
@abstractmethod
def __init__(self): pass
@abstractmethod
async def on_command_error(self, ctx: Context, error: CommandError): pass