I am trying to develop a bot using discord.py that will be able to go through the channel, count how many times a certain word is used, then give me the top X number of users that have said that phrase (in a given timeframe), along with the number of times that they have each said it.
So if I do !bump7, I want it to give me the top, say, 10 users that have said "bump" in the last 7 days
Or !hello10, which would give me the top 10 users that have said "hello" in the last 10 days.
The message would look something like... Billybob 34 times Cathrynaloha 27 times Suzy 3 times JohnDoe 2 times
I have the bot connected to the discord server, but I can't seem to figure out how to make this particular command work. And unfortunately no, I don't have anything in the works, as I'm just trying to search through here to see if anything similar has been done. So far, not a whole lot has been helpful. So any help on developing the client.command() would be awesome! Thank you!
-
I've actually tried really hard to do something similar to this person here: Discord.py: How to go through channel history and count the occurrences of a phrase?
However, it does not work at all, and I have no idea why. The conversation there is not exactly extensive, so I don't have a whole lot of context to work out anything. So re-opening/reiterating seems beneficial here
I've tried searching other areas in this site (and even a handful of other sites) to see if I can't troubleshoot it myself, but have run into too many walls. Guidance would be awesome.