Sending initial changes, adding the concept of Handlers, Views, Exceptions and Result, these class will optimaze the code in terms of cleanliness and organizational

This commit is contained in:
Rafael Vargas
2022-03-21 16:11:38 -04:00
parent 2bd100a3e1
commit 5c4d09bf9d
13 changed files with 241 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
from typing import Union
from discord.ext.commands import Context
from vulkan.controllers.Exceptions import Error
class AbstractResult:
def __init__(self, ctx: Context, success: bool) -> None:
self.__success: bool = success
self.__ctx: Context = ctx
@property
def ctx(self) -> Context:
return self.__ctx
@property
def success(self) -> bool:
return self.__success
def error(self) -> Union[Error, None]:
pass

View File

@@ -0,0 +1,9 @@
from vulkan.results import AbstractResult
from typing import Union
from discord.ext.commands import Context
from vulkan.controllers.Exceptions import Error
class SuccessResult(AbstractResult):
def __init__(self) -> None:
super().__init__()