I should implement a Challenge System. This can replace the weird Verification Code System I have to verify proof-of-ownership. We don't need to create cryptographically secure hashes, because I can take advantage of the fact that commands ran by someone are authenticated by Discord through Discord's authentication.
Specification:
- The ability for Bot Owners to create challenges using /challenge create (user_id?) = create a challenge bound to the user id if given, and not bound if user_id is not provided. Returns a challenge ID on success, and None on failure.
- The ability for users to complete challenges using /challenge complete (challenge id). If the challenge is bound to that user, complete the challenge (marking it as completed). If the challenge does not exist, or is not bound to that user (and it is bound to a different user), return "Error: Invalid challenge, unbound challenge, or nonexistent challenge". if it's not bound, then completing a challenge must be an atomic operation through the tests
- The ability for Bot Owners to verify challenge completion status (via /challenge verify (challenge id?) = if challenge id is specified, provide challenge completion status of that challenge (completed? expired? by whom?)
- The ability for moderators to ban people from the Challenge System (via /denylist add challenge (user_id)?) Maybe it should be merged with the appeal system
- Unit tests for Challenges (& Atomicity), Unit tests for each of those 4 commands
- Pushing it to discord
I should implement a Challenge System. This can replace the weird Verification Code System I have to verify proof-of-ownership. We don't need to create cryptographically secure hashes, because I can take advantage of the fact that commands ran by someone are authenticated by Discord through Discord's authentication.
Specification: