Skip to content

Instantly share code, notes, and snippets.

@jeluard
Last active July 3, 2018 15:07
Show Gist options
  • Save jeluard/f834f3c7af94e5306cb976891bc82355 to your computer and use it in GitHub Desktop.
Save jeluard/f834f3c7af94e5306cb976891bc82355 to your computer and use it in GitHub Desktop.

Chat commands are:

  • only available in 1x1 chats
  • identified by a global unique verb
  • associated with a list of arguments
    • typed : free (string, float, int), constrained (query result)
    • can trigger a suggestion component : reuse regular list components?
    • trigger a callback when fired (call an events, visual feedback? always send a message?)
@goranjovic
Copy link

Exactly that was my point about typed arguments. string, float would be free by default while events based would be constrained.

Ok, so it's time to bring validation into the discussion. Because even "free" texts or numbers aren't truly free, e.g. they would be lowercase-only, non-empty, larger than zero, etc.

For the constrained ones we'd typically have the default validation that the value has to exist in the list of allowed values. Practically enum type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment