Hunt the code
Hide codes and let your users collect them.
Hunt the code
Hide codes and let your users collect them
This module is open-source.
This module is storing data in your bot's database.
This module has one configuration file.
This module is being actively used on over 3500 other servers on SCNX.
This module is included for free in every plan. Learn more about prices.
Features
- Create hidden codes with custom display names that users can find and redeem.
- Users can view their profile with all found codes and their progress.
- A leaderboard shows the top code hunters.
- Generate reports with detailed statistics about users and codes.
- End the current code hunt session, which generates a final report and clears all data.
- Codes can be auto-generated or manually specified.
Setup
- Set up slash command permissions for
/hunt-the-code-adminto restrict administrative commands to moderators. - Create codes using
/hunt-the-code-admin create-codeand hide them around your server, website, or other locations. - Share the code strings with your community through creative hiding spots (e.g., in channel descriptions, images, or external pages).
Usage
Administrators manage the code hunt:
- Use
/hunt-the-code-admin create-codeto create new codes. Each code has a display name and a code string (auto-generated if not specified). - Use
/hunt-the-code-admin reportto generate a detailed report with user rankings and code statistics. - Use
/hunt-the-code-admin endto end the current hunt session -- this generates a final report and deletes all codes and user progress.
Users participate in the code hunt:
- Use
/hunt-the-code redeemto enter a code they have found. - Use
/hunt-the-code profileto view their found codes and overall progress. - Use
/hunt-the-code leaderboardto see the top 20 code hunters.
Commands
Understand the documentation
In these docs,
name:<Type> is an option of a slash-command with name name and the type Type. Options that not required, are described as [name:<Type>]. If the action of a command is vastly different between required and not-required options, we might list them separately.Examples
/moderate ban user:<Member>: This command (/moderate ban) has an required option with the name "user" that only accepts one member as a value./moderate ban victim:<Member> reason:<Text>: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value and another required option with the name "reason" that accepts any text as an value./moderate ban victim:<Member> reason:<Text> [proof:<Attachment>]: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value, another required option with the name "reason" that accepts any text as an value and a not-required option with the name "proof" which allows one attachment as its value.
| Command | Description |
|---|---|
/hunt-the-code redeem code:<Text> | Redeem a code you have found. The code is case-insensitive. |
/hunt-the-code profile | View your profile showing all found codes and your progress towards finding all available codes. |
/hunt-the-code leaderboard | View the top 20 users who have found the most codes. |
/hunt-the-code-admin create-code display-name:<Text> [code:<Text>] | Create a new code with a display name. If no code string is specified, one will be auto-generated. Requires the Manage Messages permission. |
/hunt-the-code-admin report | Generate a detailed report of the current code hunt session, including user rankings and code statistics. The report is uploaded as a temporary document. Requires the Manage Messages permission. |
/hunt-the-code-admin end | End the current code hunt session. Generates a final report, then deletes all codes and user progress. Requires the Manage Messages permission. |
Configuration
In this configuration file, you can customize the messages used by this module. Open it in your dashboard.
| Field | Description |
|---|---|
| Code-not-found Message | Message shown when a user tries to redeem an invalid code. |
| Code-already-Redeemed Message | Message shown when a user tries to redeem a code they have already found. |
| Code-Redeemed Message | Message shown when a user successfully redeems a code. |
| Profile-Message | The embed shown when a user views their profile, displaying found codes and progress. |
| Leaderboard-Message | Customize the appearance of the leaderboard embed (title, color, thumbnail, image). |
Troubleshooting
Users cannot redeem codes
- Make sure the code was created successfully using
/hunt-the-code-admin create-code. - Codes are case-insensitive, so capitalization does not matter.
- Check if the user has already redeemed the code by having them check their profile.
Stored data
The following data is being stored:
For every code:
- The code string (primary key)
- The display name of the code
- The number of times the code has been redeemed
- Metadata about the entry (date when created and last updated)
For every user:
- The Discord User ID
- The total number of codes found
- A list of all redeemed code strings
- Metadata about the entry (date when created and last updated)
To remove all data stored by this module, purge the module database.
