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

feat: Help Command Pagination #1581

Merged

Conversation

Tiernan-Alderman
Copy link
Contributor

@Tiernan-Alderman Tiernan-Alderman commented May 14, 2024

feat: Help Command Pagination

Description: Changed HelpCommand to now be sorted into different pages for commands, which should help to further help users to find the correct commands they are looking for without having to scroll through a list of 92 commands.

Motivation and Context: Recommendation from Aron, and my own experience reading through the /help command list.

How Has This Been Tested?: Running my server and using the /help command will return page 1 of the command list. Running /help 1 will as well, but /help 2 and so forth will return that respective page number of commands (currently 10 commands per page). If a user tries to enter a command higher than the number of pages, it will say it is an invalid page number. Additionally, commands will only show up given the user has the proper GMLevel to use that command.

@aronwk-aaron aronwk-aaron changed the title Update Help Pagination feat: Help Command Pagination May 14, 2024
Copy link
Collaborator

@EmosewaMC EmosewaMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two comments

dGame/dUtilities/SlashCommandHandler.cpp Outdated Show resolved Hide resolved
dGame/dUtilities/SlashCommandHandler.cpp Show resolved Hide resolved
@Tiernan-Alderman
Copy link
Contributor Author

Performed tests after merging with main and the previous sorting changes. Running /help will show the list of help terms, alphabetically, and currently is configured to 10 commands at a time to be shown. Running /help 2 will show page 2 etc. If the user doesnt have a high enough gm, it will alert them that those commands dont exist.

Copy link
Collaborator

@EmosewaMC EmosewaMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • still needs to re add the help<command>
  • you removed serialization with will cause issues.

dGame/dUtilities/SlashCommandHandler.cpp Outdated Show resolved Hide resolved
Now able to do /command help to see info for said command. Additionally this works for aliases. Fixed serialization missing from merge.
@Tiernan-Alderman
Copy link
Contributor Author

Reverted code and reimplemented /help , rather than / help. Alongside keeping pagination

aronwk-aaron
aronwk-aaron previously approved these changes May 21, 2024
@aronwk-aaron aronwk-aaron requested a review from EmosewaMC May 21, 2024 13:46
Copy link
Collaborator

@EmosewaMC EmosewaMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the stoi and use try parse instead.

dGame/dUtilities/SlashCommandHandler.cpp Outdated Show resolved Hide resolved
@aronwk-aaron aronwk-aaron merged commit ed00551 into DarkflameUniverse:main May 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants