Recently my bot was growing and I took the time to rewrite the code to make it work with the cogs system of Discord Py
I have adapted all the code correctly, however all the on_message events that I had stopped working, without throwing any type of error message.
The module is loaded correctly and there are no syntax errors, so I can't understand what could be happening.
Some of my code:
import discord
import random
import datetime
from discord.ext import commands
class eastereggs(commands.Cog):
def __init__(self, bot):
self.bot = bot
self._last_member = None
@commands.Cog.listener()
async def on_message(self,message):
Cheers= ["Hi", "hi", "Hello", "hello"]
if message.content in Cheers:
await message.channel.send('Hello again')
await self.bot.process_commands(message)
def setup(bot):
bot.add_cog(eastereggs(bot))
However, it does not react to any of the greetings in the array
I edit: I have multiple on_message events with arrays
But only one seems to work