Fixed is ready function #309

This commit is contained in:
Sven Heidemann 2023-04-12 22:04:49 +02:00
parent ebdf375283
commit 089de53136

View File

@ -1,13 +1,9 @@
from typing import Optional from typing import Optional
from cpl_translation import TranslatePipe
from discord.ext import commands from discord.ext import commands
from discord.ext.commands import Context
from bot_core.abc.client_utils_abc import ClientUtilsABC from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.exception.check_error import CheckError from bot_core.exception.check_error import CheckError
from modules.permission.abc.permission_service_abc import PermissionServiceABC
class EventChecks: class EventChecks:
@ -23,7 +19,7 @@ class EventChecks:
@classmethod @classmethod
def check_is_ready(cls): def check_is_ready(cls):
async def check_if_bot_is_ready() -> bool: async def check_if_bot_is_ready() -> bool:
result = await cls._client_utils.check_if_bot_is_ready() result = await cls._client_utils.check_if_bot_is_ready_yet()
if not result: if not result:
raise CheckError(f"Bot is not ready") raise CheckError(f"Bot is not ready")
return result return result