-
Notifications
You must be signed in to change notification settings - Fork 31
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
Command for checking a user's forum stats #8
Comments
What do you say about /userinfo for this command? We can use some parameters, like general (will include post count, reputation, posts-per-day), visitor_messages, what do you say? |
Yep, that sounds perfect! |
|
I don't think we need a Discord username (the user already knows this from typing the command), online status or some of the activity stuff. I'd actually like to keep this minimal - even though there will be usage limiting to prevent spam, it's not really good practice to have commands post paragraphs of text. I say we post the info in a single paragraph but separate Forum name: [HLF]Southclaw Member since: 2009 Reputation: 1500 etc: etc... Regarding the activity/date stuff: For one thing, most of the discord join dates are going to be early 2017, when this server opened. The forum join date is probably the more interesting one to users. Discord activity could be useful if a user disappears for a while, depends if the API exposes this value as I'd rather not introduce more state tracking to the bot. Last forum activity can be scraped but is it really necessary? Use cases? |
I've added scraping for TotalPosts, LastActive and JoinDate... Reputation is remaining though which I don't know where should I get it from. I need to goto any of user's posts to get it or any other solution ? |
It should be visible from the user profile page, in the "mini stats" box if I remember correctly. |
Yeah, that's odd, everything else is exposed via the user page! I suppose you'll need to use |
As I suggested to @johnymac, maybe we should separate the discord/forum data.
Also, when you PM people with multiple names you can see their alternative names at the top, is it possible to get these AKA's through the API? |
Command should be in pm or general channel ? |
I say general, but with rate-limiting and a minimal line-footprint (see my earlier post). |
An idea for this command is to store reputation in a database field and a MD5 hash for page http://forum.sa-mp.com/search.php?do=finduser&u=ID and every time when a user execute this command the bot should compare the MD5 or the user will wait a little bit for the bot to query 2 pages. |
That hash will be different everytime the user posts and not when rep changes. |
The codebase has a cache available at So just store the user profile object or data in a cache keyed by the ID/URL/Username and only do lookups if the cache lookup doesn't hit. |
Yes, like I literally said, it's called "Current Activity" on the forum. It's only available when the user is active on the forum. So we will only show that line if the user is online on the forum. And yes, CJ should call it "Last Activity" since it's sent in a message that isn't current after it's sent. |
Requires some xpath/web scraping knowledge:
The text was updated successfully, but these errors were encountered: