Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Username Format configurable #144

Merged

Conversation

Wissididom
Copy link
Collaborator

@Wissididom Wissididom commented Jan 1, 2024

What the PR does:

  • Fixes
    • /mod score failing because the subcommandgroup is null, which was to be checked against the stringscore to see if the command was executed. This was fixed by just moving the score case into a new switch inside the default case.
  • Added
    • /settings username set <mode> to set the username format. The mode is an integer option with different names, so the bot receives the integer option from Discord on interactionCreate so that there doesn't have to be string comparisons.
    • /settings username show to just simply show what the setting is currently set to
    • /settings username help just like the other commands to explain the newly added commands
    • /settings username unset to just set the username mode to 4 (it's a zero-based integer in the order of the list that is in the linked issue, 4 is the default we decided on there).
    • Since the Championship is not implemented yet, the only place that had to handle it was leaderboard.ts (Checked with git --no-pager grep username).

@Wissididom Wissididom linked an issue Jan 1, 2024 that may be closed by this pull request
@Wissididom
Copy link
Collaborator Author

LGTM and works as expected from what I can tell. Feel free to merge if it looks good to you too.

@Wissididom Wissididom marked this pull request as ready for review January 1, 2024 20:18
@Wissididom Wissididom added the enhancement New feature or request label Jan 2, 2024
@GeorgeCiesinski
Copy link
Owner

Looks good to me too. Thanks for the update!

@GeorgeCiesinski GeorgeCiesinski merged commit 7af3237 into GeorgeCiesinski:develop Jan 3, 2024
3 checks passed
@Wissididom Wissididom deleted the configurable-username branch January 3, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Username type configurable
2 participants