Skip to content

Educate about /foo when ?!.foo - #759

Merged
Zabuzard merged 7 commits into
developfrom
feature/slash_command_educate
Feb 7, 2023
Merged

Zabuzard merged 7 commits into
developfrom
feature/slash_command_educate

Conversation

@Zabuzard

@Zabuzard Zabuzard commented Jan 30, 2023 •

Copy link
Copy Markdown
Member

Overview

Implements and closes #654.

Adds a slash command educator that sends an advice when it sees someone posting a message command ?foo, !foo, .foo, telling them how to use slash commands /foo instead. Looks like this:

example

Details

The actual pattern used to match messages is:

[.!?] // Start of message command
[a-zA-Z]{2,15} // Name of message command, e.g. 'close'
.*

So it will not react on stuff like ?? or ? whats this.

Other

Also added unit tests. And got rid of a bigger code duplication with MessageReceiverAdapter where nearly every implementation wrote super(Pattern.compile(".*"));.

@Zabuzard Zabuzard added enhancement New feature or request priority: normal labels Jan 30, 2023
@Zabuzard Zabuzard self-assigned this Jan 30, 2023
@Zabuzard
Zabuzard requested review from a team as code owners January 30, 2023 08:54
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard

Zabuzard commented Feb 7, 2023

Copy link
Copy Markdown
Member Author

1 week, lets go

@Zabuzard
Zabuzard merged commit 28d173c into develop Feb 7, 2023
@Zabuzard
Zabuzard deleted the feature/slash_command_educate branch February 7, 2023 08:38
@Zabuzard Zabuzard mentioned this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React on ?foo !foo .foo to educate about slash commands

1 participant