diff options
Diffstat (limited to 'arthur/__init__.py')
| -rw-r--r-- | arthur/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arthur/__init__.py b/arthur/__init__.py index a7efb0b..0d837f6 100644 --- a/arthur/__init__.py +++ b/arthur/__init__.py @@ -1,7 +1,19 @@ """King Arthur is Python Discord's DevOps utility bot.""" +import asyncio +import os from functools import partial +from typing import TYPE_CHECKING import loguru +if TYPE_CHECKING: + from arthur.bot import KingArthur + logger = loguru.logger.opt(colors=True) logger.opt = partial(logger.opt, colors=True) + +# On Windows, the selector event loop is required for aiodns. +if os.name == "nt": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + +instance: "KingArthur" = None # Global Bot instance. |