PluralKit/crates/commands/src/commands.udl

24 lines
505 B
Text
Raw Normal View History

2024-09-13 16:02:30 +09:00
namespace commands {
CommandResult parse_command(string prefix, string input);
2024-09-13 16:02:30 +09:00
};
[Enum]
interface CommandResult {
Ok(ParsedCommand command);
Err(string error);
};
[Enum]
interface Parameter {
MemberRef(string member);
SystemRef(string system);
MemberPrivacyTarget(string target);
PrivacyLevel(string level);
OpaqueString(string raw);
Toggle(boolean toggle);
Reset();
};
2024-09-13 16:02:30 +09:00
dictionary ParsedCommand {
string command_ref;
record<string, Parameter> params;
record<string, Parameter?> flags;
2024-09-13 16:02:30 +09:00
};