Open crazybmanp opened 7 years ago
We need to look into the feasibility of this enhancement
one option would be subclassing the bot class. our bot class would be mostly identical, but we could override the on_message function to increment a post count or some such thing. a custom bot class would also allow me to have a config property/object on the bot, so the config would be easily accessible in all cogs.
it is currently possible to override the on_message function and pass control back to the bot, but if there were a way to make multiple cogs register to receive these events cleanly this would be a good solution.
if you feel like implementing an entire signalling system, i guess. as far as i'm aware, python doesn't have one by default.
I guess we will need to look into this more with some actual code experiments, because the on_message event is already being grabbed by the discord.ext library to pass on events to the cogs, and that cannot be interrupted.
Looks like, as @razage pointed out in the little meeting thingy, there is "Listener" decorator, we can just use that. I will triage the card and we will get to this.
New issue: the Listener decorator cannot be used as simply in object oriented code.
someone should look into this now that we have the custom bot/cog classes.
ok, so what should this leaderboard even show. is it a useful feature even?
Make it to see who says the most on discord that would be helpful in the future when more ppl are on the discord so you can see who is more active or active at all