crazybmanp / RyuZU-Bot

A discord bot built on modularity with cogs.
0 stars 0 forks source link

Leaderboard or Top posters system #3

Open crazybmanp opened 7 years ago

crazybmanp commented 7 years ago

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

crazybmanp commented 7 years ago

We need to look into the feasibility of this enhancement

razage commented 7 years ago

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.

crazybmanp commented 7 years ago

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.

razage commented 7 years ago

if you feel like implementing an entire signalling system, i guess. as far as i'm aware, python doesn't have one by default.

crazybmanp commented 7 years ago

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.

crazybmanp commented 7 years ago

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.

crazybmanp commented 7 years ago

New issue: the Listener decorator cannot be used as simply in object oriented code.

crazybmanp commented 7 years ago

someone should look into this now that we have the custom bot/cog classes.

crazybmanp commented 7 years ago

ok, so what should this leaderboard even show. is it a useful feature even?