captcha¶
Button-and-modal role verification for Red-DiscordBot.
Install¶
[p]repo add taakoscogs https://github.com/TaakoOfficial/TaakosCogs
[p]cog install taakoscogs captcha
[p]load captcha
How It Works¶
- A member presses Verify.
- Captcha generates a new six-character code for that click.
- Discord opens a modal with the code in its title.
- The member enters the code.
- Captcha gives them every role configured for that panel that they do not already have.
Only the latest active code is accepted. Incorrect and expired challenges require a new button click, which always generates a different code from the member's previous click on that panel.
Post the Predefined Panel¶
Optionally provide a custom button label:
Mention between one and ten roles first. Any remaining text becomes the button label.
Attach to an Existing Message¶
The message must have been sent by the same bot and cannot contain unrelated buttons or dropdowns.
[p]captcha attach <message-link> @Verified
[p]captcha attach <message-link> @Verified @Member Verify Me
Message content and embeds are preserved; Captcha adds only its persistent button.
Commands¶
| Command | Description |
|---|---|
[p]captcha |
Show setup information and the configured panel count. |
[p]captcha post <channel> <roles...> [label] |
Post the predefined verification embed. |
[p]captcha attach <message> <roles...> [label] |
Attach verification to an existing bot message. |
[p]captcha remove <message> |
Remove a configured verification button. |
[p]captcha list |
List configured captcha panels and roles. |
Dashboard¶
Captcha includes a Red-Web-Dashboard page for server managers. The dashboard can post the predefined verification panel, attach the button to an existing bot-authored message, remove configured panels, and review the current panel message/channel/role mappings.
Security¶
- Codes use cryptographically secure randomness and exclude ambiguous characters.
- A code is scoped to one server, panel, and member.
- Only the newest active code is accepted.
- Challenges expire after five minutes and are never stored persistently.
- Captcha refuses managed roles, roles above the bot, and roles with administrative or moderation permissions.
- Each panel can assign between one and ten roles.
Requirements¶
- Red-DiscordBot 3.5.0 or newer.
- Bot permissions to
Send MessagesandEmbed Linkswhen posting a panel. - Bot permission to
Read Message Historywhen attaching by message link. - Bot permission to
Manage Roles. - The bot's highest role must be above the configured verification role.
Data¶
Captcha stores panel message IDs, channel IDs, role IDs, and button labels. Verification codes and user IDs are held transiently in memory for code rotation and active modal validation, and are cleared when the cog unloads.