Discord Bot Quick Start
Last updated
Was this helpful?
Last updated
Was this helpful?
Before we get into the nitty-gritty, you need to make sure that SafeLink is properly invited to your server. You can use the on the to quickly invite the bot.
Once invited, you should see a list of commands when you type /
as well as the bot account in your member list.
SafeLink works via an action system. This means that you define actions that have both a trigger and a response. If a message is sent that meets the criteria for a trigger, then SafeLink will enact the associated response.
For example, it is common to create an action that is triggered by Scams or Phishing links with a response to Delete the message. This is what that would look like:
You can add as many actions as you like, with any combination of trigger and response. You can create multiple actions with the same trigger that enact different responses, and vice versa.
There were a lot more than just triggers and responses in the screenshots above, and there's a lot more you can configure with actions.
Bypass Channels are channels or categories that are ignored by the action. For Example, if you create an action to delete discord invites, but specify #ads
as a bypass channel, nothing will happen when sending a discord invite in #ads
, but it will be deleted in #general
. This is especially useful if you are using the All Links
trigger, which will enact a response on every link posted. To specify a category, use the ID of the category.
Bypass Roles work the same way as Bypass Channels and are specified in the same manner when creating actions. You can specify both channels and roles in the same option.
Channel Locks are channels that lock the action. This means that the action will only run in those specified channels, ignoring any other channel. This is useful for making an action only run in one or two channels or any channel in one category.
Specifying a DM message will send a direct message to anyone who enacts this specific action.
If you specify a response that mutes a user, you can use this option to define how long mutes should last. Typing a number will autocomplete with exact lengths. If you don't use the autocomplete values, you can specify an exact length in milliseconds.
Once actions are created, you can redefine them by using the same /actions add
slash command and specifying the same trigger and response, but with different options. This will overwrite the previous action with your new options.
Deleting an action is as simple as /actions remove
.
By now you should have a good understanding of actions, and how SafeLink's core works. But there might still be things you are wondering about. the /config
commands give you the ability to log when actions are triggered, specify a role to give when muting users, change how SafeLink detects links, and more.
Every time an action is triggered, SafeLink will send a case log to your specified log channel. You can use case logs for quick actions such as reversing a response (unmute, unban), reporting a false positive, or whitelisting links.
When muting a user in a response, SafeLink will use Discord's Timeout feature. You can also specify a mute role to be given for the duration of the mute.
To decide what is a link or not, SafeLink looks for a specific pattern. This is very similar to how Discord highlights clickable links. By default, SafeLink doesn't care if a link starts with a protocol or not. By setting greedy_links
to False
, SafeLink will only scan links that begin with http://
or https://
.
SafeLInk will display every link it detects in a message on a case log. By setting hidelinks
to True
, SafeLink will put those links behind spoilers.
THIS FEATURE IS IN BETA AND MAY SHOW NSFW CONTENT IN CASE LOGS
By setting render
to True
, SafeLink will display a screenshot of the first link detected in messages sent to case logs. This is not recommended if you share your case logs publically as the screenshots could contain NSFW content.
You can reset some options in your config with /config reset
.
If you need more control over exactly what links are or are not allowed on your server, you can use link lists. Both a blacklist and whitelist are provided.
When adding a link or domain to a link list, you must specify which. Here's an example:
Say you want to prevent anyone from sending a Discord invite in your server. You can accomplish this by adding an action that is triggered by Discord Invites and deletes them. The issue is this will also delete your own server's invite. To prevent this, you can add your specific discord invite as a link to the whitelist.
This works in a similar manner with the blacklist, although instead of preventing actions from being run, every link or domain that matches a blacklist entry is immediately deleted. Regardless of actions.
When referring to SafeLink Link Lists, a link is a full URL, i.e. . While a domain does not specify a protocol, path, or URL params. i.e. .
Now, if you had instead added as a domain, SafeLink would have interpreted it as , and then every URL from the domain would have bypassed all actions.