diff options
| author | 2020-05-18 01:36:51 -0400 | |
|---|---|---|
| committer | 2020-05-18 01:36:51 -0400 | |
| commit | 7051fef7c12e0322ba559ed97aa4d1eba3ffc461 (patch) | |
| tree | b68c772823e09efbd2eafa230cd8c7437de2e0de /bot | |
| parent | F i x e d S p a c e (diff) | |
| parent | Merge pull request #407 from python-discord/prefix-rich-presence (diff) | |
Merge branch 'master' into patch-1
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/__init__.py | 6 | ||||
| -rw-r--r-- | bot/bot.py | 5 | 
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()) @@ -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"), +) | 
