Customization

Anti-abuse & automod

Qbot already provides verification checks to secure actions done via the bot, but it also offers anti abuse to limit the amount of actions a user can carry out in your group before they are automatically demoted (for the security of the group). We also offer a command to revert action logs if admin abuse does occur, regardless of the many countermeasures already in place.

This config section also provides an option to automatically delete group wall posts with links in them, stopping your group's wall from being abused by members to advertise other groups or games.

If you need help at any point in this documentation, please don't hesitate to join our Discord server.

Setting up anti-abuse

This feature scans audit logs for a lot of actions in a short period of time, and demotes the responsible user to prevent admin abuse. If you enable this feature, we recommend closely watching your action logs (and definitely enabling them if you haven't) to make sure no one is falsely demoted.

Enabling the feature

If you just logged in to your VPS, run cd qbot to enter Qbot's directory. Then, you can run nano src/config.ts to open the configuration in a text editor. Read this for a refresher on how to use this editor.

Use Ctrl+W to search for antiAbuse, which should look something like:

antiAbuse: {
    enabled: false,
    clearDuration: 1 * 60,
    threshold: 5,
    demotionRank: 1,
    bypassRoleId: '',
},

You can enable the anti abuse system by changing enabled to true, like so:

enabled: true,

Setting the clear duration

The clear duration is how many seconds it takes for Qbot to reset the action counter. By default, the option will look like this:

clearDuration: 1 * 60,

You can either remove the * 60 if you prefer to have more granular control over this setting and pick a certain amount of seconds, or just change the 1 to change how many mintues it takes.

Setting the threshold

The threshold value is how many actions until something is considered admin abuse. By default, this is 10, but we recommended increasing it for large groups where people might be ranking a lot of people at a time.

Setting the demotion rank

The demotion rank value is the rank of the role you would like to demote users to when they trigger the admin abuse detection. By default, this is 1.

Enabling wall auto-moderation

This feature listens for posts on your group's wall, and if there is a link detected, deletes them.

Enabling the feature

If you just logged in to your VPS, run cd qbot to enter Qbot's directory. Then, you can run nano src/config.ts to open the configuration in a text editor. Read this for a refresher on how to use this editor.

Use Ctrl+W to search for deleteWallURLs, which should look something like:

deleteWallURLs: false,

You can enable this feature by changing its config value to true, like so:

deleteWallURLs: true,

Save your changes

Press Ctrl+X, then y, then enter to save your changes in nano. To restart Qbot, run this command:

pm2 restart 0
Previous
XP and Auto Promotions