-
-
Notifications
You must be signed in to change notification settings - Fork 101
Update to SlashCommandEducator to exclude strings that end with ")" o… #808
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
…r ";" from potential incorrect commands. Also, updates to SlashCommandEducatorTest to include new tests.
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.
Good stuff. Seems that you have to run spotless for auto-formatting though :)
application/src/main/java/org/togetherjava/tjbot/features/basic/SlashCommandEducator.java
Outdated
Show resolved
Hide resolved
…rect formatting. RawReminderTestHelper I think was caught up in the whole project autoformat as well.
I got the merge going again. I got Spotless working and should now pass. I am unsure about the other workflow programs. Spotless suggested changing a method in SlashCommandEducator because the parameter being passed in was already a final in the class and thus didn't need to be passed in and could be accessed freely. One other thing I couldn't figure out (and wasn't sure if it made sense) was to try and make the response ephemeral? I think the classes involved can't do this and I don't know if its what you want. |
…rect formatting. RawReminderTestHelper I think was caught up in the whole project autoformat as well.
Thanks, I like it 👍
Yeah, thats not possible. Ephemeral only works if you have a client interaction to interact with. For example if the user invoked a slash command, you can respond ephemeral to that. But you can not send ephemeral messages "out of nowhere". |
Seems that the unit tests fail for one of the strings:
Seems to be that one: Which makes sense, since the regex classifies any message ending with semicolon a non-command. But I think thats also what we want. So maybe move that string to the |
application/src/test/java/org/togetherjava/tjbot/features/reminder/RawReminderTestHelper.java
Outdated
Show resolved
Hide resolved
…hanges to RawReminderTestHelper.
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.
awesome! 🎉
…r ";" from potential incorrect commands. Also, updates to SlashCommandEducatorTest to include new tests.
Closes #804 .