-
-
Notifications
You must be signed in to change notification settings - Fork 89
Too many roles bugfix role-select #404
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
Conversation
88671d5
to
b9392fc
Compare
Kudos, SonarCloud Quality Gate passed! |
application/src/main/java/org/togetherjava/tjbot/commands/SlashCommandAdapter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/SlashCommandAdapter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/SlashCommandAdapter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Outdated
Show resolved
Hide resolved
any blockers here, or just missing time? |
Mainly forgotten about it, and besides that I don't have a lot of free time so yea, someone else can take over if they want, otherwise I'll take a look when I have the time / finished some other things. |
This pull request is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days. |
The new RoleSelectCommand takes vararg of Roles, and generates the embed based on that.
b9392fc
to
edf680a
Compare
Kudos, SonarCloud Quality Gate passed! |
application/src/main/java/org/togetherjava/tjbot/commands/basic/RoleSelectCommand.java
Show resolved
Hide resolved
Noice. Merging tomorrow, after doing the mini release. |
Overview
This fixes the bug with
/role-select
crashing on servers having too many roles. And by that closes #400 .It is done by redesigning the command. Instead of having two dialogs (one for the moderator to create the actual dialog and one final for the user to pick), the moderator now picks their options directly as arguments to the command.
Helper
While at it, we introduced a little helper method to
SlashCommandAdapter
:generateMultipleOptions
andgetMultipleOptionsByNamePrefix
Former basically takes a given option, such as
"foo"
and create a list of optional options:"foo1"
"foo2"
"foo3"
And latter can parse that back conveniently.