blob: f553462667af2b60fd6e925d2ae9d43581cefb1b (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 | from discord.ext import commands
SPOOKY_TRIGGERS = {
    'spooky': "\U0001F47B",
    'skeleton': "\U0001F480",
    'doot': "\U0001F480",
    'pumpkin': "\U0001F383",
    'halloween': "\U0001F383",
    'jack-o-lantern': "\U0001F383",
    'danger': "\U00002620"
}
class SpookyReact:
    """
    A cog that makes the bot react to message triggers.
    """
    def __init__(self, bot):
        self.bot = bot
    async def on_message(self, ctx):
        """
        A command to send the hacktoberbot github project
        """
        for trigger in SPOOKY_TRIGGERS.keys():
            if trigger in ctx.content.lower():
                await ctx.add_reaction(SPOOKY_TRIGGERS[trigger])
def setup(bot):
    bot.add_cog(SpookyReact(bot))
 |