Added logic to handle commands
This commit is contained in:
12
src/cpl_discord/events/on_command_abc.py
Normal file
12
src/cpl_discord/events/on_command_abc.py
Normal 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
|
12
src/cpl_discord/events/on_command_completion_abc.py
Normal file
12
src/cpl_discord/events/on_command_completion_abc.py
Normal 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
|
12
src/cpl_discord/events/on_command_error_abc.py
Normal file
12
src/cpl_discord/events/on_command_error_abc.py
Normal 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
|
Reference in New Issue
Block a user