mirror of
https://github.com/weyne85/discord_music_bot.git
synced 2025-10-29 16:58:27 +00:00
Upgrading clean code
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
from typing import Union
|
||||
from discord.ext.commands import Context
|
||||
from Exceptions.Exceptions import Error
|
||||
from Exceptions.Exceptions import VulkanError
|
||||
from discord import Embed
|
||||
|
||||
|
||||
class ControllerResponse:
|
||||
def __init__(self, ctx: Context, embed: Embed = None, error: Error = None) -> None:
|
||||
def __init__(self, ctx: Context, embed: Embed = None, error: VulkanError = None) -> None:
|
||||
self.__ctx: Context = ctx
|
||||
self.__error: Error = error
|
||||
self.__error: VulkanError = error
|
||||
self.__embed: Embed = embed
|
||||
self.__success = False if error else True
|
||||
|
||||
@@ -19,7 +19,7 @@ class ControllerResponse:
|
||||
def embed(self) -> Union[Embed, None]:
|
||||
return self.__embed
|
||||
|
||||
def error(self) -> Union[Error, None]:
|
||||
def error(self) -> Union[VulkanError, None]:
|
||||
return self.__error
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user