Closed Shivansh-007 closed 3 years ago
I would like to work on this on my own
@saiTama-max Feel free to give it a shot -- I'll assign you.
I already have a polished version of the gurkancount command that was supposed to go on SeasonalBot. We could use that as the base here. https://github.com/python-discord/sir-lancebot/blob/901cb7afbd3bd485152c2c32c52a100a1a023609/bot/exts/evergreen/gurkan.py
Furthermore, we want to either fuzzy match or use a regex for checking if someone is gurkan. I'd love to hear about your ideas on what the best approach would be. We have a members list in the server that you could have a look at if you want some inspiration.
so the idea i currently have is to use fuzzywuzzy for the isgurkan command and regex for gurkancount, reason being is that in fuzzywuzzy you get a ratio/percentage on how much the substring matches, this could be used to tell how much purity the person has to the gurkult, but if we use this in the gurkancount command, i dont see any sense in using it there anyway, since we just show the count, and it would be just unnecessary code to check if the percentage is greater than 30 or something so it is a valid gurkan, we could use regex here which would be cleaner
In both cases, I would like it to use the same function to give a yes or no answer for if the person is gurkan. Doesn’t matter to me if it uses purely regex, fuzzy matching or a combination.
I also like the idea of adding a “purity” indicator for the isgurkan command. This is how I would imagine the embed for isgurkan:
@user
is 15% gurkan. <- description
(Red embed)
@usergurkan
is 83% gurkan.
(Green embed)
oh so a common function for both? then i think i could use fuzzywuzzy then
Yep. At least for getting the Boolean that says either True or False. That’s what we use to count the amount of gurkans, check isgurkan and auto-assign gurkan roles. We need to be consistent in what names are considered gurkan and what names aren’t.
is_gurkan check and gurkancount
Gurkancount checks how many gurkans there are in the server. Isgurkan checks if a certain member is a gurkan.
Who is a gurkan?
Gurkan is person who has
gurk
orgurkan
in his name, it can be in any caseWould you like to implement this yourself?