mirror of
https://github.com/cloudmaker97/Discord-Captcha-Verification.git
synced 2025-12-06 01:48:34 +00:00
A simple bot for verifying users after joining a discord server via a Captcha from CloudFlare Turnstile and logging their IP-Information for legal reasons
| modules | ||
| .gitignore | ||
| config.example.json | ||
| index.js | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tailwind.config.js | ||
Discord-Verification
This is a simple discord verification bot that uses a captcha (CloudFlare Turnstile). The bot creates an embed in a specified discord channel with a button. If the button is clicked, the user receives a personal link. After clicking the link, the user is redirected to the captcha page. If the captcha is solved, the user is verified and receives a role. The bot also logs the user's IP address and the time of verification.
Installation
You need to have Node.js and pnpm installed.
- Clone the repository
- Install the required packages with
pnpm install - Copy the
config.example.jsonfile and rename it to.config.json - Fill in the required fields in the
.config.jsonfile (see Settings) - Start the bot with
pnpm start
Settings
These are the settings that need to be filled in the config.json file:
protocol: The protocol of the website (http or https)host: The hostname of the hosted websiteport: The available port of the websitechannelId: The ID of the discord channel where the verification embed will be sentchannelLogsId: The ID of the discord channel where the logs will be sentverifiedRoleId: The ID of the role that will be given to the verified usersdiscordToken: The token of the discord botturnstileSitekey: The sitekey of the CloudFlare Turnstile captchaturnstileSecret: The secret of the CloudFlare Turnstile captcha
Development
If you want to contribute to the project, you can use the following commands:
pnpm tailwind: Start the tailwindcss compiler in watch mode
The project structure is as follows:
modules/discord: Client for Discordmodules/website: Webserver and static filesmodules/events: EventEmitter for communication between discord client and website