Vulkan/Handlers/HandlerResponse.py
2022-07-23 09:52:20 -03:00

28 lines
726 B
Python

from typing import Union
from discord.ext.commands import Context
from Config.Exceptions import VulkanError
from discord import Embed
class HandlerResponse:
def __init__(self, ctx: Context, embed: Embed = None, error: VulkanError = None) -> None:
self.__ctx: Context = ctx
self.__error: VulkanError = error
self.__embed: Embed = embed
self.__success = False if error else True
@property
def ctx(self) -> Context:
return self.__ctx
@property
def embed(self) -> Union[Embed, None]:
return self.__embed
def error(self) -> Union[VulkanError, None]:
return self.__error
@property
def success(self) -> bool:
return self.__success