mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
refactor(command_parser): simplify how tokens are defined in commands
This commit is contained in:
parent
f804e7629f
commit
071db3d6d6
9 changed files with 114 additions and 76 deletions
|
|
@ -18,9 +18,7 @@ pub mod server_config;
|
|||
pub mod switch;
|
||||
pub mod system;
|
||||
|
||||
use command_parser::{
|
||||
command, command::Command, concat_tokens, parameter::ParameterKind::*, tokens,
|
||||
};
|
||||
use command_parser::{command, command::Command, parameter::ParameterKind::*, tokens};
|
||||
|
||||
pub fn all() -> impl Iterator<Item = Command> {
|
||||
(help::cmds())
|
||||
|
|
@ -29,3 +27,5 @@ pub fn all() -> impl Iterator<Item = Command> {
|
|||
.chain(config::cmds())
|
||||
.chain(fun::cmds())
|
||||
}
|
||||
|
||||
pub const RESET: (&str, [&str; 2]) = ("reset", ["clear", "default"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue