Hunt the code
Hide codes and let your users collect them.
Sammel die Codes
Verstecke Codes und lasse sie von deinen Nutzern sammeln
Dieses Modul ist Open-Source.
Dieses Modul speichert Daten in der Datenbank deines Bots.
Dieses Modul erstellt 2 Haupt-Slash-Befehle auf deinem Server.
Dieses Modul eine verfügbare Konfigurationsdatei.
Dieses Modul wird auf über 3600 Servern auf SCNX aktiv verwendet.
Dieses Modul ist bei jedem Plan kostenlos dabei. Mehr über Preise erfahren.
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
Dokumentation Verstehen
In dieser Dokumentation bezeichnen wir eine verpflichtende Slash-Befehl-Option mit dem Namen
name und dem Typen Typ als name:<Typ>. Optionen, die nicht Pflichtfelder sind, werden als [name:<Typ>] angegeben. Wenn sich die Aktionen eines Befehls zwischen Pflichtfeldern und Nicht-Pflichtfeldern sehr unterscheiden, listen wir sie eventuell separat.Beispiele
/moderate ban user:<Mitglied>: Dieser Befehl (/moderate ban) hat nur eine verpflichtende Option mit dem Namen "user", die nur ein Mitglied akzeptiert./moderate ban victim:<Mitglied> reason:<Text>: Dieser Befehl (/moderate ban) hat eine Option mit dem Namen "victim" als Pflichtangabe, die nur ein Mitglied akzeptiert, und ein weiteres Pflichtfeld mit dem Namen "reason", das jeglichen Text als Wert akzeptiert./moderate ban victim:<Mitglied> reason:<Text> [proof:<Anhang>]: Dieser Befehl (/moderate ban) hat eine Option mit dem Namen "victim" als Pflichtangabe, die nur ein Mitglied akzeptiert, und ein weiteres Pflichtfeld mit dem Namen "reason", das jeglichen Text als Wert akzeptiert. Zusätzlich gibt es eine optionale Option mit dem Namen "proof", die einen Anhang als Wert akzeptiert.
| 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.
