| modules | ||
| .gitignore | ||
| config.example.json | ||
| docker-compose.yml | ||
| 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
Run with Docker
You can also run the bot with Docker. You need to have Docker installed.
- Clone the repository
- Copy the
config.example.jsonfile and rename it to.config.json - Fill in the required fields in the
.config.jsonfile (see Settings) - Run the following command to start the bot:
docker compose up -d. - To stop the bot, run the following command:
docker compose down
You can set the published ports in the docker-compose.yml file.
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