From 06cd25eb969c8557eb652b4fbb14bdb4019cf4be Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 8 Jan 2020 01:11:50 +0100 Subject: [PATCH] Added auto reactions --- cogs/fun/reactions.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cogs/fun/reactions.py diff --git a/cogs/fun/reactions.py b/cogs/fun/reactions.py new file mode 100644 index 0000000..349fe45 --- /dev/null +++ b/cogs/fun/reactions.py @@ -0,0 +1,36 @@ +import discord +from discord.ext import commands + +class Reactions(commands.Cog): + + def __init__(self, client): + self.client = client + + @commands.Cog.listener() + async def on_message(self, message : discord.Message): + if message.author.bot: + return + + if "canada" in message.content.lower(): + await message.add_reaction("🇨🇦") + + if "germany" in message.content.lower(): + await message.add_reaction("🇩🇪") + + if "uk" in message.content.lower() or "britain" in message.content.lower(): + await message.add_reaction("🇬🇧") + + if "china" in message.content.lower(): + await message.add_reaction("🇨🇳") + + if "america" in message.content.lower() or " usa" in message.content.lower(): + await message.add_reaction("🇬") + await message.add_reaction("🇦") + await message.add_reaction("🇾") + + if "extremejoy" in str(message): + message.add_reaction(664251611765407745) + + +def setup(client): + client.add_cog(Reactions(client)) \ No newline at end of file