diff options
author | 2019-03-03 21:50:01 -0500 | |
---|---|---|
committer | 2019-03-03 21:50:01 -0500 | |
commit | b53d8d8b7fe7c33c6931fa9075c30c27ea9c02da (patch) | |
tree | 92ab3e99bebbc0b0dac06571d1e2e6d30f2622cf /bot/seasons/halloween/spookyreact.py | |
parent | Merge pull request #112 from RohanJnr/be-my-valentine-iceman (diff) |
Add new Cog class inheritance & event listener decoration
Mitigates recent breaking d.py changes
Diffstat (limited to 'bot/seasons/halloween/spookyreact.py')
-rw-r--r-- | bot/seasons/halloween/spookyreact.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/seasons/halloween/spookyreact.py b/bot/seasons/halloween/spookyreact.py index f63cd7e5..92afe798 100644 --- a/bot/seasons/halloween/spookyreact.py +++ b/bot/seasons/halloween/spookyreact.py @@ -2,6 +2,7 @@ import logging import re import discord +from discord.ext.commands import Cog log = logging.getLogger(__name__) @@ -16,7 +17,7 @@ SPOOKY_TRIGGERS = { } -class SpookyReact: +class SpookyReact(Cog): """ A cog that makes the bot react to message triggers. @@ -25,6 +26,7 @@ class SpookyReact: def __init__(self, bot): self.bot = bot + @Cog.listener() async def on_message(self, ctx: discord.Message): """ A command to send the seasonalbot github project |