mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 06:17:55 +00:00
implement autoproxy commands
This commit is contained in:
parent
c42385f01c
commit
2b304457cc
4 changed files with 66 additions and 34 deletions
|
|
@ -1 +1,21 @@
|
|||
use super::*;
|
||||
|
||||
pub fn autoproxy() -> (&'static str, [&'static str; 2]) {
|
||||
("autoproxy", ["ap", "auto"])
|
||||
}
|
||||
|
||||
pub fn cmds() -> impl Iterator<Item = Command> {
|
||||
let ap = autoproxy();
|
||||
|
||||
[
|
||||
command!(ap => "autoproxy_show").help("Shows your current autoproxy settings"),
|
||||
command!(ap, ("off", ["stop", "cancel", "no", "disable", "remove"]) => "autoproxy_off")
|
||||
.help("Disables autoproxy"),
|
||||
command!(ap, ("latch", ["last", "proxy", "stick", "sticky", "l"]) => "autoproxy_latch")
|
||||
.help("Sets autoproxy to latch mode"),
|
||||
command!(ap, ("front", ["fronter", "switch", "f"]) => "autoproxy_front")
|
||||
.help("Sets autoproxy to front mode"),
|
||||
command!(ap, MemberRef => "autoproxy_member").help("Sets autoproxy to a specific member"),
|
||||
]
|
||||
.into_iter()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ pub fn all() -> impl Iterator<Item = Command> {
|
|||
.chain(switch::cmds())
|
||||
.chain(random::cmds())
|
||||
.chain(api::cmds())
|
||||
.chain(autoproxy::cmds())
|
||||
.map(|cmd| {
|
||||
cmd.hidden_flag(("plaintext", ["pt"]))
|
||||
.hidden_flag(("raw", ["r"]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue