diff options
| author | 2020-03-07 14:04:17 +0100 | |
|---|---|---|
| committer | 2020-03-07 14:04:17 +0100 | |
| commit | f229b442ef4d474737fe5edd0d5a2ff142effc8d (patch) | |
| tree | defb130b4cf3af18a889ccbc485c52042d518f70 | |
| parent | Merge branch 'master' into seasonal-purge (diff) | |
Deseasonify: remove reference to non-existent task, redundant attr
The `_fact_publisher_task` task was removed many commits ago, yet the
listener still attempts to launch it.
There is no need to set the channel instance attr, as it isn't used
anywhere.
This renders the listener useless, and it can be removed.
| -rw-r--r-- | bot/seasons/halloween/halloween_facts.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/bot/seasons/halloween/halloween_facts.py b/bot/seasons/halloween/halloween_facts.py index 94730d9e..51b64be9 100644 --- a/bot/seasons/halloween/halloween_facts.py +++ b/bot/seasons/halloween/halloween_facts.py @@ -33,16 +33,9 @@ class HalloweenFacts(commands.Cog): self.bot = bot with open(Path("bot/resources/halloween/halloween_facts.json"), "r") as file: self.halloween_facts = json.load(file) - self.channel = None self.facts = list(enumerate(self.halloween_facts)) random.shuffle(self.facts) - @commands.Cog.listener() - async def on_ready(self) -> None: - """Get event Channel object and initialize fact task loop.""" - self.channel = self.bot.get_channel(Channels.seasonalbot_commands) - self.bot.loop.create_task(self._fact_publisher_task()) - def random_fact(self) -> Tuple[int, str]: """Return a random fact from the loaded facts.""" return random.choice(self.facts) |