-
-
Notifications
You must be signed in to change notification settings - Fork 93
Tag system #135
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
Tag system #135
Conversation
Seems like I forgot to add javadoc, will add it now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done.
While I would strongly prefer it if you made usage of sub-commands instead.
Makes it easier for the user and will allow a ton more commands.
This in total is 8 commands while it could be 1.
application/src/main/java/org/togetherjava/tjbot/commands/tag/CreateIdTagCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagCommand.java
Outdated
Show resolved
Hide resolved
I first thought about that as well, but it would be kinda confusing for new users to do |
Do like the idea of a separate tagmanage command, even better than one for all |
Yea, I'll implement it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve it.
Still I'll mention that it's maybe nice to replace some of the code in the switch with methods?
Just a suggestion, the code is good. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're cute keep it up
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagUtility.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystem.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystem.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystem.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/tag/TagManageCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/AbstractCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/Command.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/CommandHandler.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystem.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
tag-system/src/main/java/org/togetherjava/tjbot/tag/TagSystemInstanceHolder.java
Outdated
Show resolved
Hide resolved
a7c8615
to
b1f75eb
Compare
Rebase on |
NotNull found out that the |
All changes have been implemented.
b1f75eb
to
6f85237
Compare
It was indeed a problem. I pushed code to fix it now. |
Spotless after rebase
* markdown escaper doesnt escape backslash \ correctly. * introduced own escaper layer to correct it * covered by unit tests Spotless after comment
1fb7b82
to
4156833
Compare
Kudos, SonarCloud Quality Gate passed! |
This PR adds a tag system & commands to use it. Closes #61.
Implemented commands are:
/tag <id>
to view a tag/tags
to view all tagsand management commands
/tag-manage raw <id>
to view the raw contents of a tag/tag-manage create <id> <content>
to create a tag with given content/tag-manage create-with-message <id> <message-id>
to create a tag based on the content of an existing message/tag-manage edit <id> <content>
to edit a tag with given content/tag-manage edit-with-message <id> <message-id>
to edit a tag based on the content of an existing message/tag-manage delete <id>
to delete an existing tagThe
with-message
overloads forcreate
andedit
are necessary and super useful when having more complex content with code formatting and similar, since slash commands do not support newlines.