diff options
| -rw-r--r-- | bot/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/__init__.py b/bot/__init__.py index 2dd4af225..4131b69e9 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,3 +1,4 @@ +import asyncio import logging import os import sys @@ -59,3 +60,8 @@ coloredlogs.install(logger=root_log, stream=sys.stdout) logging.getLogger("discord").setLevel(logging.WARNING) logging.getLogger("websockets").setLevel(logging.WARNING) logging.getLogger(__name__) + + +# On Windows, the selector event loop is required for aiodns. +if os.name == "nt": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |