Self-hosted Discord captcha verification bot to make your Server more secure
Find a file
2026-02-15 01:48:48 +01:00
src removed TOS link in the config and website. 2026-02-15 00:44:59 +01:00
.gitignore Adding local files 2026-02-15 00:35:21 +01:00
config.yml replaced mcaptcha base_url with mcaptcha.org's demo URL 2026-02-15 00:50:17 +01:00
package.json Adding local files 2026-02-15 00:35:21 +01:00
README.md Added CS hosted version to README 2026-02-15 01:48:48 +01:00

DiscSec Captcha Bot

Self-hosted Discord captcha verification bot with:

  • unverified role gating on member join
  • DM-based verification links with short-lived tokens
  • Web captcha page (/verify/<token>) using mCaptcha
  • Per-server settings in SQLite (roles + log channel)
  • Private captcha log channel creation and event logging

Install CS hosted Bot on your Server:

Invite the bot via THIS LINK

Or THIS LINK (Admin Permissions - May help if problems occur)

*Note that CrystalSky is not responsible for damage made by this Bot (e.g. in case some script kiddy hacked the bot)


Setup

  1. Prerequisites:

Make sure you have a working instance of mCaptcha. You can also use their demo instance (you may want to mention this in your privacy policy).

  1. Install dependencies:
npm install
  1. Edit config.yml:
  • bot.discord_token
  • bot.base_url
  • mcaptcha.base_url
  • mcaptcha.site_key
  • mcaptcha.secret_key
  1. Start:
npm start

mCaptcha config

Default behavior now matches common mCaptcha setup:

  • Verify endpoint: <mcaptcha.base_url>/api/v1/pow/siteverify
  • Widget URL: <mcaptcha.base_url>/widget/?sitekey=<site_key>
  • Submitted field: mcaptcha__token
  • Verification payload:
    • token: captcha token
    • key: site key
    • secret: account secret
  • Success check: valid === true

You can still override mcaptcha.verify_url, mcaptcha.widget_url, mcaptcha.response_field, and mcaptcha.verify_payload if needed.

Commands

Default command prefix is !captcha.

  • !captcha help
  • !captcha resend
  • !captcha test
  • !captcha admin-role <new name>
  • !captcha unverified-role <new name>
  • !captcha log-channel <new-name>

admin-role, unverified-role, log-channel require guild owner or captcha admin role.

!captcha test requires admin permission and defaults.test_enabled: true in config.yml.