blob: c2c515498a46176f20910d3961ee0d64800ef90a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
"""King Arthur is Python Discord's DevOps utility bot."""
import asyncio
import os
from functools import partial
from typing import TYPE_CHECKING
import loguru
from botcore.utils import apply_monkey_patches
if TYPE_CHECKING:
from arthur.bot import KingArthur
logger = loguru.logger.opt(colors=True)
logger.opt = partial(logger.opt, colors=True)
apply_monkey_patches()
# 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.
|