diff options
author | 2020-05-18 01:28:13 -0400 | |
---|---|---|
committer | 2020-05-18 01:28:13 -0400 | |
commit | 96230b0b75a7e2ba81bb44414a4f9694559c7e52 (patch) | |
tree | 4c9aaa2bf64965e6a8c48b7a1085799758ae1a76 /bot/__init__.py | |
parent | Show bot prefix in rich presence (diff) | |
parent | Merge pull request #410 from Numerlor/windows-event-loop (diff) |
Merge branch 'master' into prefix-rich-presence
Diffstat (limited to 'bot/__init__.py')
-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 4729e50c..6976e089 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,3 +1,4 @@ +import asyncio import logging import logging.handlers import os @@ -63,3 +64,8 @@ logging.basicConfig( handlers=[console_handler, file_handler] ) logging.getLogger().info('Logging initialization complete') + + +# On Windows, the selector event loop is required for aiodns. +if os.name == "nt": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |