Skip to content
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

Implement proposed command APIs in package twicmd #4

Open
diamondburned opened this issue Feb 29, 2024 · 0 comments
Open

Implement proposed command APIs in package twicmd #4

diamondburned opened this issue Feb 29, 2024 · 0 comments

Comments

@diamondburned
Copy link
Member

diamondburned commented Feb 29, 2024

The proposal defines the following Protobuf:

message Command {
  // The start of each slash command. Each service registers its own
  // single-word name, usually the brand name, to be used in this.
  string service = 1;
  // Command arguments, in the format key:value. This must be immediately
  // after the service name.
  repeated CommandArgument args = 2;
  // The trailing argument, in the format value. This particular argument
  // requires no quoting.
  optional CommandArgument tail = 3;
}

message CommandArgument {
  string key = 1;
  string value = 2;
  optional string description = 3;
  // The hint that the parser will use.
  // The NLP will also use it to determine speech recognition.
  CommandArgumentHint hint = 4;
}

enum CommandArgumentHint {
  COMMAND_ARGUMENT_HINT_NONE = 1;
  COMMAND_ARGUMENT_HINT_STRING = 2;
  COMMAND_ARGUMENT_HINT_NUMBER = 2;
  COMMAND_ARGUMENT_HINT_INTEGER = 4;
  COMMAND_ARGUMENT_HINT_PERSON = 5;
  COMMAND_ARGUMENT_HINT_EMAIL = 6;
  COMMAND_ARGUMENT_HINT_PHONE_NUMBER = 7;
  COMMAND_ARGUMENT_HINT_ADDRESS = 8;
  // ...
}

We should implement this in twicmd as actual Protobuf code then connect the existing slash commands parser package to it.

@diamondburned diamondburned converted this from a draft issue Feb 29, 2024
@diamondburned diamondburned moved this from In progress to Backlog in Project Tracker Feb 29, 2024
@diamondburned diamondburned moved this from Backlog to Blocking in Project Tracker Feb 29, 2024
@diamondburned diamondburned moved this from Blocking to In progress in Project Tracker Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant