aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dennis Pham <[email protected]>2020-05-18 01:36:51 -0400
committerGravatar GitHub <[email protected]>2020-05-18 01:36:51 -0400
commit7051fef7c12e0322ba559ed97aa4d1eba3ffc461 (patch)
treeb68c772823e09efbd2eafa230cd8c7437de2e0de
parentF i x e d S p a c e (diff)
parentMerge pull request #407 from python-discord/prefix-rich-presence (diff)
Merge branch 'master' into patch-1
-rw-r--r--bot/__init__.py6
-rw-r--r--bot/bot.py5
2 files changed, 10 insertions, 1 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())
diff --git a/bot/bot.py b/bot/bot.py
index b0162377..39ed8bbe 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -203,4 +203,7 @@ class SeasonalBot(commands.Bot):
await self._guild_available.wait()
-bot = SeasonalBot(command_prefix=Client.prefix)
+bot = SeasonalBot(
+ command_prefix=Client.prefix,
+ activity=discord.Game(name=f"Commands: {Client.prefix}help"),
+)