Polaris group defender is an open source system that aims to prevent Group admin abuse, and make it a thing of the past. It will detect, prevent, alert and revert abuse.
This package can be cloned from this repo or installed from NPM Via: npm install group-defender
.
It scans your group and checks if someone has performed too many actions in the audit log as defined by your threshold. If they have, it demotes the user and alerts you.
At present Group defender can detect admin abuse and automatically demote the user, according to given thresholds, and send a webhook alert to Discord.
In future it will support automatic reversion of abuse, but this is not present in v1.
One "Group defender" instance is required for each group you want to defend. Example usage:
const GroupDefender = require("group-defender")
const client = new GroupDefender( {
delay: 60,
cookie: "Your cookie",
groupId: "123",
webhook: "Your Discord webhook URL",
demotionRank: 1
} )
client.monit()
You can make use of the methods manually, or use the monit
method to automatically check the group.
All time values should be supplied in seconds.
The module exports the GroupDefender class, which is your primary class. One of these is required for each group, but you can have many clients.
Multi-group clients are not currently supported. You are recommended to simply use the monit
method to watch your group.
const GroupDefender = require("group-defender")
const client = new GroupDefender( Your_config )
cookie
: Required: Your full Roblox cookie (.ROBLOSECURITY
). Include the warning, it is recommended that you use a bot account.webhook
: Required: Your Discord webhook, which will executed when an attack is detected.groupId
: Required: The ID of the group you want to scan and protect.delay
: The delay for the monit function. It will scan your group everydelay
seconds. Default: 60sdemotionRank
: The rank which users will be demoted to if they exceed the threshold. Default: 1threshold
: The number of actions which when exceeded, will cause the user to be demoted. Default 10.duration
: The time which that threshold can be reached within. Default 10 minutes, so users can perform 10 actions in 10 minutes.
Once you have a client you can use it's methods, documented below:
GroupDefender.monit(delay?)
Runs a "scan" of the group and checks that no abuse has taken place. This will be run every delay
seconds. A delay can be passed, or the value given to the config will be used.
This is the recommended way to make use of this package.
GroupDefender.getRecent()
Returns any logs that have taken place since the last time getRecent
was run. This will return an empty array the first time it is used.
GroupDefender.updateActions(Logs)
(Internal)
This takes the logs array outputted by getRecent and updates the action totals. It is not expected to be used outside of the class itself, as it's very niche.
GroupDefender.checkActions()
Iterates the actions map and checks if any users are above the threshold value. If they are, it runs the takeAction
method which demotes them.
GroupDefender.takeAction(Info)
(Internal)
Takes the information from checkActions(The user's ActionInfo) and deranks them, then sends a webhook.
- Support automatic reversion of abuse
- Support multi-group clients
- Improve detection system
Join our Discord or DM me on Discord: Neztore#6998
.
You can also get general Roblox API Support in the Roblox API server.
Alternatively, create an issue on this repo.
Credits: