Skip to content

chainpatrol/discord-bot

Repository files navigation

ChainPatrol + Discord

ChainPatrol Discord Bot

License

ChainPatrol's Discord Bot is the official bot for Discord admins to enhance their community protection against scams and phishing attempts in their servers

Website | Documentation | Install

Features 🚀

  • ✅ Check URLs against ChainPatrol's blocklist of known phishing sites using the /chainpatrol check command.
  • 🚓 Report scam URLs to ChainPatrol using the /chainpatrol report command.
  • 📜 View a feed of scam reports for your organization in dedicated Discord channel

Coming Soon 🔜

  • 🏆 Display the ChainPatrol leaderboard of top reporters using the /leaderboard command.
  • 👀 Regular scans of server messages to detect suspicious activity.
  • 🚩 Automatic notifications of potential scams to keep users informed and safe

Moderation delete webhook

The moderation service can call this bot to delete a Discord message when a moderation action (for example action.delete) is executed for an entity that was submitted from Discord.

  • Endpoint: POST /webhooks/moderation/delete on the same port as the health server (PORT, default 3232).
  • Auth: HMAC-SHA256 headers webhook-id, webhook-timestamp, webhook-signature (same scheme as moderation outbound webhooks). The signing secret must match the env var MODERATION_WEBHOOK_SECRET (use the same value as the secret on the moderation action config that targets this URL).
  • Payload: JSON body with type action.delete or action.delete.test, timestamp, and data containing entityId, authorId, and executionId (as sent by moderation). Test deliveries set X-Test-Delivery: true or use entityId test-entity-id; the bot responds 200 without calling Discord.
  • Entity ID: Discord messages must use guildId:channelId:messageId (three colon-separated snowflakes). The bot sends this format when submitting text for moderation.

After deploy, configure the moderation project’s delete action webhook URL and secret, then validate with a test delivery. Track operational setup in Linear ENG-5463.

Contributing 🙌

We welcome contributions from anyone interested in enhancing the security of the web3 community. If you would like to contribute to the project, please feel free to read through our issues and submit a pull request.


©️ MIT 2025 ChainPatrol

About

🤖 Bot which provides Discord servers with access to ChainPatrol security tools

Topics

Resources

Stars

Watchers

Forks

Contributors