gurkult / gurkbot

Our community bot, used for running the server.
MIT License
18 stars 16 forks source link

Isgurkan command And gurkancount command #33

Closed v1nam closed 3 years ago

v1nam commented 3 years ago

Added 2 commands isgurkan, gurkancount, in a cog called GurkanStats, inside the utils extension, isgurkan checks if a user or another name is a gurkan and what is the gurkan rate (the rate by which the gurkan matches the name), gurkancount gives the number of gurkans in the server and the percentage Closes #2

uncomfyhalomacro commented 3 years ago

I need to fix the linting first

zeeshanok commented 3 years ago

Can you make the gurkan name checking logic into its own function in utils? I feel like we could use this gurkanrate thing elsewhere.

v1nam commented 3 years ago

yeah sure, should i make it a global function then?

zeeshanok commented 3 years ago

yeah sure, should i make it a global function then?

Global as in in another file that is easily accessible?

uncomfyhalomacro commented 3 years ago

@saiTama-max can u fix the flake8 as well? do u have an editor that can do it for u?

v1nam commented 3 years ago

hmm, not sure about that but i was thinking about making it inside the cog itself, but outside the cog class?

v1nam commented 3 years ago

@saiTama-max can u fix the flake8 as well? do u have an editor that can do it for u?

well actually, i already linted it with flake8 in vscode, but we are using black so i am reformatting rn

v1nam commented 3 years ago

also @zeeshanok, to get the rate, its already one line gurk_rate = process.extractOne("gurkan", [user])[1], here process is imported from fuzzywuzzy, so not sure if it is big enough to be put in a function :thinking:

vivekashok1221 commented 3 years ago

I went through your code before you linted the code in (https://github.com/gurkult/gurkbot/pull/33/commits/20e8ed390f18119919f6aa8646d8e7f33784996c) commit. That's the reason my comments are shown as "outdated".

Shivansh-007 commented 3 years ago

https://github.com/gurkult/gurkbot/issues/2#issuecomment-751464497 quoting vester, you can use the colours from the constants folder

vivax3794 commented 3 years ago

I have redirected this pr to main, following issue #61

gustavwilliam commented 3 years ago

Huh, GitHub just did something really weird — sorry about requesting all those reviews.

@saiTama-max could you resolve the merge conflicts?

v1nam commented 3 years ago

yeah let me see

v1nam commented 3 years ago

@gustavwilliam :+1: