aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/spookyreact.py
diff options
context:
space:
mode:
authorGravatar mathsman5133 <[email protected]>2018-10-12 10:29:11 +1100
committerGravatar mathsman5133 <[email protected]>2018-10-12 10:29:11 +1100
commit010cb21de026cd3021fa29fc38f838b754bd540c (patch)
tree73609ffc131e7aa76dc99dcd53286192696b86a2 /bot/cogs/spookyreact.py
parentFixed docstrings, add blank lines for readibility, method of finding last 10 ... (diff)
parentThe app was logging to the wrong directory. This is now fixed. Also silenced ... (diff)
Merge remote-tracking branch 'upstream/master' into candy-collection
Diffstat (limited to 'bot/cogs/spookyreact.py')
-rw-r--r--bot/cogs/spookyreact.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/bot/cogs/spookyreact.py b/bot/cogs/spookyreact.py
new file mode 100644
index 00000000..2652a60e
--- /dev/null
+++ b/bot/cogs/spookyreact.py
@@ -0,0 +1,31 @@
+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))