diff options
| author | 2019-06-22 22:27:06 +0530 | |
|---|---|---|
| committer | 2019-06-22 22:27:06 +0530 | |
| commit | 38405eacfb41650d69b91163ae3b12712128cc9b (patch) | |
| tree | df1f1b6f399e9c3a3f5f8146db7e53a6901334b2 /bot | |
| parent | fixed a small lint error (diff) | |
made the requested following changes :
1. Using the seasonalbot channel id from the constants file
2. Added logging to the setup funciton.
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/seasons/easter/egg_facts.py | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/seasons/easter/egg_facts.py b/bot/seasons/easter/egg_facts.py index 9ddb9440..74733910 100644 --- a/bot/seasons/easter/egg_facts.py +++ b/bot/seasons/easter/egg_facts.py @@ -1,4 +1,5 @@  import asyncio +import logging  import random  from json import load  from pathlib import Path @@ -6,9 +7,13 @@ from pathlib import Path  import discord  from discord.ext import commands +from bot.constants import Channels  from bot.constants import Colours +log = logging.getLogger(__name__) + +  class EasterFacts(commands.Cog):      """      A cog contains a command that will return an easter egg fact when called. @@ -32,7 +37,7 @@ class EasterFacts(commands.Cog):      async def send_egg_fact_daily(self):          """A background task that sends an easter egg fact in the event channel everyday.""" -        channel = self.bot.get_channel(426566445124812815) +        channel = Channels.seasonalbot_chat          while True:              embed = self.make_embed()              await channel.send(embed=embed) @@ -61,3 +66,4 @@ def setup(bot):      bot.loop.create_task(EasterFacts(bot).send_egg_fact_daily())      bot.add_cog(EasterFacts(bot)) +    log.info("EasterFacts cog loaded")  |