Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whois command #352

Merged
merged 3 commits into from
May 4, 2022
Merged

whois command #352

merged 3 commits into from
May 4, 2022

Conversation

Tais993
Copy link
Member

@Tais993 Tais993 commented Jan 24, 2022

Open to suggestions for properties to add to the command

Implementation

I decided to go for the description instead of fields, fields are useful but fill your screen easily.
When adding a lot of them, it becomes harder to read and (imho) ugly.

The embed color goes as follows:
Member color -> profile color -> default (black)

So if it's an user, that has a custom banner it'll result in black.
But if it's a member, with a member color it'll show that color instead.

Current to-do's:

  • Look for more things to show
  • Find a way to fix code duplications (it doesn't feel perfect, but it's alright)

Command signature

/whois User:user (boolean:show_server_specific_info)

Member info

If the member is boosting the guild, it'll also display since when they started boosting.
If the member isn't in VC, it won't show the in voicechannel option

image

User info

If the user has any flags (other than nitro and Hypesquad), it shows them

image

@Tais993 Tais993 added new command Add a new command or group of commands to the bot priority: normal labels Jan 24, 2022
@Tais993 Tais993 added this to the Migrate existing commands milestone Jan 24, 2022
@Tais993 Tais993 self-assigned this Jan 24, 2022
@Zabuzard
Copy link
Member

A regular user is probably not aware of the difference between user and member and will not understand what to expected from hide_member_info. Maybe rename it to hide_server_specific_info or similar. Something that the user will naturally understand better.

I would also turn around the logic, show_server_info instead of hide, is easier to understand for most people (I believe). (with default being true i.e. show)

@Tais993 Tais993 marked this pull request as ready for review January 25, 2022 10:51
@Tais993 Tais993 requested review from a team as code owners January 25, 2022 10:51
@Tais993
Copy link
Member Author

Tais993 commented Jan 25, 2022

Now I get it, sonarcloud is crying about the (unused) logger variable.

@Tais993 Tais993 linked an issue Jan 25, 2022 that may be closed by this pull request
@Tais993 Tais993 changed the title Draft whois command whois command Jan 25, 2022
@Tais993
Copy link
Member Author

Tais993 commented Feb 3, 2022

Been 7 days, but due to the merge a new commit came (without changes)

Can this be merged in the new few days?

@Tais993
Copy link
Member Author

Tais993 commented Feb 6, 2022

This PR has been stale for 12 days, could anyone review please?

@Zabuzard
Copy link
Member

Zabuzard commented Feb 7, 2022

I wasnt aware its ready, sorry.

@marko-radosavljevic
Copy link
Contributor

Hm, I like it, but the default is a bit cluttered. Do we really need fields 'is bot', 'is booster', 'hypersquad'.. etc on each /whois we do?

Maybe it makes more sense to have 2 commands, one concise and clear, so you can extract the most important info quickly, and another with more detailed info.

Short one would be without banner/background image too, and that way it would be super space efficient, you can even use it in lobby, and it wouldn't be that spammy, since it's only few fields.

@Tais993
Copy link
Member Author

Tais993 commented Feb 7, 2022

You'll have to elaborate, what important info exactly?

@marko-radosavljevic
Copy link
Contributor

marko-radosavljevic commented Feb 7, 2022

Basically just this: profile picture, ID, join/registration date. At least that's the only thing I use whois for.

Personally, I would like to know user activity on the server as well, past month and overall. That would be the most useful field for me, alongside join/registration date. Since I often have to determine if the member is positively contributing in any way, or it's just a spambot. This would probably go under more detailed view tho.

@Tais993
Copy link
Member Author

Tais993 commented Feb 7, 2022

I would like to know user activity on the server as well, past month and overall

What does this mean?

Since I often have to determine if the member is positively contributing in any way, or it's just a spambot.

Same for this, how can a bot determine this?

@marko-radosavljevic
Copy link
Contributor

marko-radosavljevic commented Feb 7, 2022

I would like to know user activity on the server as well, past month and overall

What does this mean?

Right, apologies for not being clear enough. Number of messages basically.

Since I often have to determine if the member is positively contributing in any way, or it's just a spambot.

Same for this, how can a bot determine this?

I would determine that, I just need bot to dig up some info for me.

So use case goes like this:

  1. Member reports getting an advertisement in dms, or discord invite link.
  2. I'm not familiar with the person being reported, so I decide to gather basic info by doing /whois.
    a) If I got an ID, I want to see name and profile picture, so I know who is being reported.
    b) If I got name, but I require ID, i can use whois to get ID.
  3. I require answers to a few questions to determine if the person is bot or a positively contributing member:
    a) Has this member ever typed anything on the server?
    b) Has this member joined very recently?
    c) Account age?
  4. Check message history if I'm unsure.
  5. Make a moderation action based on all this. Action is wildly different if it's a spambot harassing every member on the server with malicious intent, or just a positively contributing member sending one bad dm.

But again, this is how and why I use whois, it's quite possible that people use it for different things. I think it makes sense to have member activity on whois anyway, I would argue it's one of the most useful stats for a community member.

@Tais993
Copy link
Member Author

Tais993 commented Feb 7, 2022

Number of messages basically.

Not possible, we could assume the number the tophelpers command retrieves.
But that's only last month, and it doesn't feel right. All the info it displays is based off Discord, then we're adding custom elements. Not sure what others think about it.

a) Has this member ever typed anything on the server?

Not possible

b) Has this member joined very recently?
c) Account age?

It seems the only info you want is

  • PFP
  • ID
  • join date
  • account age

Now the question becomes, how do you want me to implement this?
Most sensible implementation would be

/whois basic User:user
/whois advanced User:user (boolean:show_server_specific_info)

But I personally don't really like it, it's becoming too much of an hassle to request data.
I'll let others decide what they want.

Could you put your comment in #64 so it can be discussed further over there?

@Heatmanofurioso
Copy link
Contributor

@Tais993 Can you give Sonar some love?

@Tais993
Copy link
Member Author

Tais993 commented Mar 3, 2022

Closed to delete the branch temporary

@Tais993 Tais993 closed this Mar 3, 2022
@Tais993 Tais993 deleted the feature/whois_command branch March 3, 2022 08:29
@Tais993 Tais993 restored the feature/whois_command branch March 3, 2022 08:29
@Tais993 Tais993 reopened this Mar 3, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Tais993
Copy link
Member Author

Tais993 commented Mar 3, 2022

@Heatmanofurioso, @Zabuzard changes have been made, and Spotless has received their not so deserving attention

Copy link
Member

@Zabuzard Zabuzard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See last open conversation

@github-actions
Copy link

github-actions bot commented Apr 3, 2022

This pull request is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Apr 3, 2022
@Tais993 Tais993 removed the stale label Apr 3, 2022
Copy link
Contributor

@illuminator3 illuminator3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it would look cleaner without the elses (what even is the plural of else?). Albeit, it's not required, and thus this review is not requesting changes.

@Zabuzard
Copy link
Member

Zabuzard commented May 3, 2022

Taking over. Ready to review.

@Zabuzard Zabuzard assigned Zabuzard and unassigned Tais993 May 3, 2022
@Zabuzard
Copy link
Member

Zabuzard commented May 3, 2022

Tested, works:

test

@sonarcloud
Copy link

sonarcloud bot commented May 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard Zabuzard merged commit e2fb1d3 into develop May 4, 2022
@Zabuzard Zabuzard deleted the feature/whois_command branch May 4, 2022 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Add a new command or group of commands to the bot priority: normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate other moderation commands
6 participants