> ## Documentation Index
> Fetch the complete documentation index at: https://chainpatrol.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Bot

> Install the ChainPatrol Discord bot to let members report scam URLs, monitor channels for phishing links, and stream blocklist reports to a feed channel.

![ChainPatrol Discord Bot](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=df1671dc5db3e588cf0db4592e0a2e84)

If you have a **Discord server**, you can use the [ChainPatrol Discord bot](https://chainpatrol.com/bot)
to let your server members submit scam reports to **ChainPatrol**. The bot will generate new
reports that get sent to your admin dashboard for review.

## Setup

> [!TIP]
>
> If you have a dedicated `scam-reports` channel, we recommend pinning a message
> in this channel and directing your server members to use the bot there for
> easy reporting

### Install the bot

To add the bot to your server, you need to be an admin of the server. Then, you
can use the following link to add the bot:

[🚀 Add ChainPatrol to your server](https://chainpatrol.com/bot/install)

Next, you need to configure the bot to send reports to your admin dashboard on ChainPatrol. Right now,
this is can be done by reaching out to us [via email](mailto:support@chainpatrol.io?subject=%5BDiscord%20Bot%5D%20Setup%20integration%20with%20ChainPatrol\&body=Hi,%20I%20would%20like%20to%20link%20the%20Discord%20bot%20to%20my%20ChainPatrol%20account%20as%20described%20here:%20https://chainpatrol.io/docs/general/discord-bot.%0A%0AThanks!)
and letting us know that you want to add the bot to your server. We will create an organization
for you on ChainPatrol and you can then use the `/setup connect` slash command to link your Discord server
to your organization on ChainPatrol.

To check that the bot is working, you can use the `/setup status` command to see if the bot is
connected to your ChainPatrol organization.

## Features

### Scam Reports

The bot allows server members to submit scam reports directly to ChainPatrol.

#### Usage

Once the bot is added to your server, you can use the following commands:

* `/report <url>` - Submit a scam report for the given URL
* `/check <url>` - Check if the given URL is a scam

#### Example

Here is an example of how to use the bot to submit a scam report:

![Example of using the ChainPatrol Discord bot](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-prompt.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=e947b9db720da0f67d9081859fd4c336)

![Loading of the ChainPatrol Discord bot](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-loading.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=3c69765f3020a443dbd5ca87cdcf2110)

![Success of the ChainPatrol Discord bot](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-success.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=30717276da4f54c61e38a94e0760e0fb)

### Reports Feed

You can create a feed channel of all reports to your organization. This feature allows you to see all scam reports submitted through the bot in a dedicated channel.

#### Setup

1. Create a new channel on your Discord server and name it something like `chainpatrol-reports`
2. Use the following command to link the channel to your ChainPatrol organization:
   ```
   /setup feed <channel>
   ```
3. Follow the instructions in the bot's response to link the channel to your ChainPatrol organization

![Image showing the Discord bot's response to the setup feed command](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-feed-setup.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=81717be0fe88c5bd82f58f0bcfe43703)

You can check that the feed is connected correctly by running the `/setup status` command. If the
feed is connected correctly, you should see the channel name in the bot's response.

![Image showing the Discord bot's response to the setup status command after setting up the feed](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-feed-status.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=7cb2b729bdc0778a0d4ce564160fbde9)

As a final test, you can try submitting a test scam report using the `/report` command. You should see a message
in the feed channel with the scam report shortly after submitting.

![Example of the feed channel](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-feed.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=dbcc2b4c0dbe3e7f59b86a5f6b07bfad)

### Link Monitoring

ChainPatrol can monitor your Discord channels for suspicious links and automatically take action when they are detected. This feature helps protect your community from scams and malicious content.

#### Setup

To enable link monitoring in a channel:

1. Navigate to the channel you want to monitor
2. Run the `/setup linkmonitoring` command
3. Confirm the setup when prompted

> [!TIP]
>
> Only server administrators or users with "Manage Server" permissions can
> enable link monitoring

#### How it Works

Once enabled, ChainPatrol will:

1. Monitor all messages in the configured channel for URLs
2. Check each URL against ChainPatrol's comprehensive blocklist, which includes:
   * Known scam websites
   * Phishing attempts
   * Malicious domains
   * Other security threats reported to ChainPatrol
3. Take action based on your server's configuration when suspicious links are detected

> [!TIP]
>
> The blocklist is continuously updated with new threats reported by the
> ChainPatrol community and security researchers. You can [search through our
> blocklist](https://app.chainpatrol.io/search) to see what threats we're
> protecting against.

#### Response Actions

When a suspicious link is detected, ChainPatrol can be configured to:

* **React with 🚨** - Adds a warning reaction to the message
* **Delete the message** - Automatically removes the message
* **Notify moderators** - Sends an alert to your moderator channel

> [!TIP]
>
> The response action is configured by your server administrator through the
> ChainPatrol dashboard

#### Example

Here's what happens when a suspicious link is detected:

![Example of link monitoring in action](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-bot-link-monitoring.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=e9fd55c453a0984c1875b2f7093dcad7)

## Common Issues

![no-response](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-application-no-response.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=7777d495b36f0d2100043ffeaf3db253)

### Custom Elevated Permissions

* Bot role may need elevated permission to interact with private channels

* If you are adding the bot to a channel that is not normally visible to `@everyone`, then you will need to
  Slash commands not visible to Discord members

  > [card] Private Channel Permissions
  >
  > ![Kebab Menu](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-private-channel.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=499d05bdb2f27a329f156667e938a295)

  > [card] Adding ChainPatrol Bot
  >
  > ![Report Modal](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-select-app.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=13bee28361e013942d5eca03617c5969)

* Embed links permissions are required for your reports feed

  ![channel embeds](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-channel-embed-links.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=817e48a07dad269ea5088eae709b44a4)

* Make application commands available to users
  * Server members will not be able to use the ChainPatrol bot commands if they do not have access to application commands

    ![application commands](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-application-comands.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=54436a850d36253bd49875a3df86c6b6)

## Debugging Tips

### View Server As Role

* You can right click the ChainPatrol role in server settings to see the server as the bot role

  ![view as role](https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/images/discord-view-as-role.png?fit=max\&auto=format\&n=oLEHOzLMXL0CWKrg\&q=85\&s=57cec3d4a92e1ce205b127558fb5ce7a)

> [!TIP]
>
> Trying to access a feature in an inaccessible part of the server will lead to
> an error. Make sure the bot's permissions can see and interact with what you
> are debugging.
>
> Check out [Discord's Role Management 101](https://support.discord.com/hc/en-us/articles/214836687-Role-Management-101) Article for additional help!

## Privacy

The bot does not collect any personal information. It only collects the URL and
the Discord ID for the user that submitted the report (in case a moderator needs
more information about why the URL is a scam). The bot does not store any information
about the server it is added to.

For more information, please read ChainPatrol's [privacy policy](https://chainpatrol.com/legal/privacy).

## Source Code

The source code for the bot is available on GitHub:
[chainpatrol/discord-bot](https://github.com/chainPatrol/discord-bot)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.