blob: 6646f2aff66904960b2044d68c847ac7e33632fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import asyncio
import os
from typing import TYPE_CHECKING
import arrow
from pydis_core.utils import apply_monkey_patches
from bot import log
if TYPE_CHECKING:
from bot.bot import Bot
log.setup()
# Set timestamp of when execution started (approximately)
start_time = arrow.utcnow()
# On Windows, the selector event loop is required for aiodns.
if os.name == "nt":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
apply_monkey_patches()
instance: "Bot" = None # Global Bot instance.
|