Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Invalid Command Activity Message

How to show invalid command message. Example we are using /Help or /CommandName to show the command activity, but if the user type "/CommandName test" or "/CommandName ABC" we want to show invalid command messange

  
  
Posted 2 years ago
Edited 2 years ago
Votes Newest

Answers


You can define additional slash command handlers that accept a wildcard regular expression behind to serve as a catch-all.

bdk.activities().register(slash("/Help", false, context -> {
	// Regular logic
}));

bdk.activities().register(slash("/Help .*", false, context -> {
	// Invalid usage logic
}));
1
1
Posted 2 years ago
Yong Sheng Tan
39 × 2 Administrator
9K Views
1 Answer
2 years ago
2 years ago
Tags