mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
implement the rest of the config commands
This commit is contained in:
parent
a268f75d32
commit
0f26a69f1b
11 changed files with 480 additions and 296 deletions
|
|
@ -276,6 +276,7 @@ fn get_param_ty(kind: ParameterKind) -> &'static str {
|
|||
ParameterKind::MessageRef => "Message.Reference",
|
||||
ParameterKind::ChannelRef => "Channel",
|
||||
ParameterKind::GuildRef => "Guild",
|
||||
ParameterKind::ProxySwitchAction => "SystemConfig.ProxySwitchAction",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -298,6 +299,7 @@ fn get_param_param_ty(kind: ParameterKind) -> &'static str {
|
|||
ParameterKind::MessageRef => "Message",
|
||||
ParameterKind::ChannelRef => "Channel",
|
||||
ParameterKind::GuildRef => "Guild",
|
||||
ParameterKind::ProxySwitchAction => "ProxySwitchAction",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ interface Parameter {
|
|||
OpaqueInt(i32 raw);
|
||||
Toggle(boolean toggle);
|
||||
Avatar(string avatar);
|
||||
ProxySwitchAction(string action);
|
||||
Null();
|
||||
};
|
||||
dictionary ParsedCommand {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ pub enum Parameter {
|
|||
Avatar {
|
||||
avatar: String,
|
||||
},
|
||||
ProxySwitchAction {
|
||||
action: String,
|
||||
},
|
||||
Null,
|
||||
}
|
||||
|
||||
|
|
@ -103,6 +106,9 @@ impl From<ParameterValue> for Parameter {
|
|||
ParameterValue::ChannelRef(channel_id) => Self::ChannelRef { channel_id },
|
||||
ParameterValue::GuildRef(guild_id) => Self::GuildRef { guild_id },
|
||||
ParameterValue::Null => Self::Null,
|
||||
ParameterValue::ProxySwitchAction(action) => Self::ProxySwitchAction {
|
||||
action: action.as_ref().to_string(),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue