-
-
Notifications
You must be signed in to change notification settings - Fork 101
tag qol #602
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
Closed
Closed
tag qol #602
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4ff1dc1
Bugfix
Tais993 53ed3f0
for tijs
illuminator3 a2c7a63
Fixed tests not working
Tais993 4632190
yes
illuminator3 82725aa
Merge remote-tracking branch 'origin/bugfix/components-not-working' i…
illuminator3 f45bf2e
why don't you just fix the imports for me sonar
illuminator3 c6885a2
fix tests
illuminator3 d3e9e5d
Merge branch 'develop' into feature/tag-qol
illuminator3 1217a4e
fix compilation & requested changes
illuminator3 f0ac722
stuff
illuminator3 0e6e8fc
remove unused import
illuminator3 9cfdc39
fix imports
illuminator3 e137e05
requested changes
illuminator3 94d1353
spotless
illuminator3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
import net.dv8tion.jda.api.interactions.commands.Command; | ||
import net.dv8tion.jda.api.interactions.commands.build.CommandData; | ||
import org.jetbrains.annotations.Contract; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.togetherjava.tjbot.commands.componentids.ComponentId; | ||
import org.togetherjava.tjbot.commands.componentids.ComponentIdGenerator; | ||
import org.togetherjava.tjbot.commands.componentids.Lifespan; | ||
|
@@ -134,4 +135,16 @@ protected final String generateComponentId(Lifespan lifespan, String... args) { | |
.generate(new ComponentId(UserInteractorPrefix.getPrefixedNameFromInstance(this), | ||
Arrays.asList(args)), lifespan); | ||
} | ||
|
||
/** | ||
* Gets the generator used to create component IDs. | ||
* <p> | ||
* In general, prefer using {@link #generateComponentId(Lifespan, String...)} and | ||
* {@link #generateComponentId(String...)} instead of interacting with the generator directly. | ||
* | ||
* @return the generator | ||
*/ | ||
protected final @Nullable ComponentIdGenerator getComponentIdGenerator() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the method is not supposed to return a nullable. its a mistake to call the method before intiialization, not allowed. the method should fail-fast if its called before. should probably also be added to its javadoc. thanks |
||
return componentIdGenerator; | ||
Zabuzard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.