Sign inSign up

twinproduction/skraid

By twinproduction

Updated almost 5 years ago

Image
0

1.1K

twinproduction/skraid repository overview

skraid

Docker Repository

To invite the bot in the server: https://discord.com/oauth2/authorize?client_id=<YOUR_BOT_CLIENT_ID>&scope=bot&permissions=11332

Skraid - a word play on scram, scam and raid - is an attempt to harness the power of large communities in order to put an end, or at least to reduce the blast radius of raids and common scams by ensuring that scammers and users known to take part in raids are banned before they can cause any harm.

This is, however, easier said than done.

This bot is built with several fail-safe mechanisms to prevent abuse.

One of these fail-safe mechanisms is the fact that inviting the bot to a guild does not allow you to modify the global ban list. The staff members of each guild (i.e. users with BAN_MEMBERS permissions) may suggest the addition of users to the global ban list by using s!suggest_blocklist USER_ID, but the decision is ultimately up to several factors which will not be disclosed to prevent malicious actors from attempting to circumvent the system. Do not be too worried, though, as one of the measures put in place requires manual action from the maintainer of the bot.

Usage

Environment variableDescriptionRequiredDefault
DISCORD_BOT_TOKENDiscord bot tokenyes""
MAINTAINER_IDUser ID of the maintainer of the botyes""
COMMAND_PREFIXString prepending all bot commands.nos!
DATABASE_PATHPath to the SQLite database fileno""

Getting started

Upon inviting Skraid in your server, you must create an alert channel where Skraid will send its messages to.

Once you've created the alert channel, make sure that Skraid has access to the channel and type the following:

s!SetAlertChannel <ALERT_CHANNEL_ID>

Where <ALERT_CHANNEL_ID> is the channel ID of your alert channel (e.g. 860216911907298444)

If you wish Skraid to not automatically take actions, you may enable alert-only mode by using the following command:

s!SetAlertOnly true

Features

  • Detect when a user is spamming (and deletes the messages marked as spam if Skraid is not in alert-only mode).
  • Send an alert if a user in the global blocklist has joined the server (or ban said user, if configured to do so). Does not affect users that were already in the server.
  • Supports per-server list of "exceptions" (allowlist), in case a guild wishes to let a user in the global ban list (blocklist) join their server anyways. This only applies if the bot is configured to ban instead of alert.
  • Detect messages containing known phishing/scam links and send an alert, or delete said messages if configured to do so.
  • Configuration for setting up a channel for alerts, including replacing all actions by alerts sent to said channel.
  • Has some utility functions to manage raids

Commands

All commands must be prefixed by the COMMAND_PREFIX, or s! by default.

Configuration
CommandDescription
GetGuildConfigRetrieve the current guild configuration.
SetAlertChannelConfigure an alert channel by passing the desired channel id as argument
SetAlertOnlyConfigure Skraid's mode. If set to false, if a user in the blocklist joins the server, they will be automatically banned. Likewise, if a user posts a message containing a forbidden word (e.g. a link known to be related to phishing), said message will be deleted. In any case, alerts will be sent as long as the alert channel is configured.
SetBanNewUserOnJoinConfigure whether Skraid should automatically ban users that were created less than two hours ago when they join the guild.
SetBanUserOnJoinConfigure whether Skraid should automatically ban every user that joins the guild. Used for when your guild is actively being raided.
User Allowlist

Each guild has their own separate allowlist which, in the case that they chose to enable Skraid's automatic banning capabilities, can allow a user they believe was wrongly blocklisted to join the server.

If alert_only is set to true, there's no need to use the allowlist as the only thing you'd be preventing is the creation of an alert.

CommandDescription
UserAllowList addAdd user ID to the guild's user allowlist
UserAllowList removeRemove user ID from the guild's user allowlist
UserAllowList searchCheck if a user ID is in the guild's user allowlist
UserAllowList listRetrieve a list of all allowlisted user ids for this guild
Suggestion

Suggestions are the mean by which guild staff members may communicate with the maintainer.

CommandDescription
Suggest WordBlocklistSuggest a word to add to the list of global forbidden words to the maintainer
Suggest UserBlocklistSuggest the addition of a user ID to the global blocklist to the maintainer.
Utilities
CommandDescription
ClearClear N messages from the current channel
StatusCheck the status of the bot
Maintainer
CommandDescription
UserBlocklist addAdd user ID to the user blocklist
UserBlocklist removeRemove user ID to the user blocklist
UserBlocklist searchCheck if user ID is in the user blocklist
WordBlocklist addAdd word in the word blocklist
WordBlocklist removeRemove word in the word blocklist
WordBlocklist searchChecks if a string contains a word from the word blocklist
WordBlocklist listRetrieve a list of all words in word blocklist

Glossary

  • user blocklist: A global list maintained by the bot's maintainer.
  • user allowlist: A per-guild list of user ids. Used only in case Skraid has flagged or banned a user whom you believe is a legitimate user.
  • word blocklist: A list of words that, if detected, will send an alert to the configured alert channel and, optionally, delete the message. These are mostly links of known scam websites.

Tag summary

Content type

Image

Digest

Size

8.8 MB

Last updated

almost 5 years ago

docker pull twinproduction/skraid