User:APBOT: Difference between revisions

From Test Wiki
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
{{Bot|TheAstorPastor}}
{{Bot|TheAstorPastor}}


This bot monitors user activity on TestWiki and manages user rights based on inactivity thresholds. It specifically tracks administrators, bureaucrats, and interface administrators, automatically removing rights from inactive users and notifying them of these changes.
This bot generates an inactivity report for administrators, bureaucrats, interface administrators, and non-steward suppressors on TestWiki. It checks the last activity of users in these roles and categorizes them based on their activity status. The report is then posted to this page - [[Activity]].


==How It Works==
== How It Works ==


#'''Login''': The bot logs in using the provided credentials.
# '''Login''': The bot logs in using the provided credentials.
#'''Fetch Users''': It retrieves a list of users in the specified groups, excluding:
# '''Fetch Users''': It retrieves a list of users in the specified groups (<code>sysop</code>, <code>bureaucrat</code>, <code>interface-admin</code>), excluding users listed in <code>EXCLUDED_USERS</code>.
# '''Check Activity''': For each user, the bot fetches the timestamp of their last edit or logged action.
#*Users specified in <code>EXCLUDED_USERS</code>
# '''Determine Status and Take Action''':
#'''Check Activity''': It fetches the last edit or log action timestamp for each user.
#* '''Warning Threshold''': Users inactive for more than 75 days (2.5 months) receive a warning message on their talk page.
#'''Determine Status''':
#* '''Removal Threshold''': Users inactive for more than 90 days (3 months) have their rights removed if possible.
#*'''Active''': Activity within the last 30 days
# '''Rights Handling''':
#*'''Inactive (1 month)''': No activity in the last 30–60 days
#* '''Removable Rights''': The bot can directly remove <code>sysop</code>, <code>bureaucrat</code>, <code>autopatrolled</code>, <code>confirmed</code>, <code>editor</code>, and <code>rollbacker</code> rights.
#*'''Inactive (2 months)''': No activity in the last 60–75 days
#* '''Steward Rights''': Rights like <code>interface-admin</code> require steward action and are flagged in the report.
#*'''Inactive (2 months, 2 weeks)''': No activity for more than 75 days
#'''Generate Report''':
# '''Communication''':
#* Posts warnings on user talk pages for those approaching inactivity threshold
#*Displays user activity status in a table
#* Notifies users when rights are removed
#*Lists grace periods only for users inactive for more than 2 months and 2 weeks
#* Updates the Activity page with a comprehensive report


== Activity Reporting ==
==How it runs and who runs it?==
The bot generates detailed activity reports including:
[[User:TheAstorPastor|TheAstorPastor]] is the primary and currently the only operator of the bot. It is scheduled to run every day using [[enwiki:Windows_Task_Scheduler|Windows Task Scheduler]]. The schedule might fail if the device is shut down, but this usually doesn’t happen. TheAstorPastor also runs the bot manually at least once a week. For any updates to the list of excluded users, please [[User:TheAstorPastor#How do you contact me?|contact]] TheAstorPastor (TheAP) through [[Test Wiki:Discord|Discord]], if possible.


* Users with rights removed due to inactivity (listing removed rights)
==Who is in the⁣ <code>EXCLUDED_USERS</code>?==
* Users approaching inactivity threshold (listing current rights)
Bots and stewards are currently exempted. The current list is as follows:
* Last activity date and days of inactivity for each user


== How does it run, and who runs it? ==
"EPIC, "Dmehus", "Drummingman", "Justarandomamerican", "MacFan4000", "Abuse filter", "Bosco-bot", "DodoBot", "FuzzyBot", "MacFanBot"
[[User:TheAstorPastor|TheAstorPastor]] is the primary and currently the only operator of the bot. It is scheduled to run every day using Windows Task Scheduler. The schedule might fail if the device is shut down, but this usually doesn’t happen. TheAstorPastor also runs the bot manually at least once a week. For any updates to the list of excluded users, please [[User:TheAstorPastor#How do you contact me?|contact]] TheAstorPastor (TheAP) through [[Test Wiki:Discord|Discord]], if possible.


==Where's the source code?==
== Excluded Users ==
The bot excludes specific users from activity checks. Bots and stewards are currently exempted. The current hardcoded list includes:
The code is available at https://github.com/younginspiration/TestWiki_Bot under MIT License. PLEASE NOTE THAT THE CODE ISN'T UPTO DATE . It doesn't reflect the functioning of the bot.

"EPIC", "Dmehus", "Drummingman", "Justarandomamerican", "MacFan4000", "Abuse filter", "Bosco-bot", "DodoBot",     "FuzzyBot", "MacFanBot"

= Where's the code for the bot? =
It is not public yet; however, if you wish to see it, please contact TheAP through Discord.