mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
28 lines
733 B
Python
28 lines
733 B
Python
from typing import Union
|
|
from discord.ext.commands import Context
|
|
from Exceptions.Exceptions import VulkanError
|
|
from discord import Embed
|
|
|
|
|
|
class ControllerResponse:
|
|
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
|