mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
partial broken fix for optional parameters (mostly message and reproxy commands)
This commit is contained in:
parent
81e0cebb8e
commit
3c59ad62bd
6 changed files with 71 additions and 53 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use super::*;
|
||||
|
||||
pub fn cmds() -> impl Iterator<Item = Command> {
|
||||
let message = tokens!(("message", ["msg", "messageinfo"]), MessageRef);
|
||||
let message = tokens!(("message", ["msg", "messageinfo"]), Optional(MessageRef));
|
||||
|
||||
let author = ("author", ["sender", "a"]);
|
||||
let delete = ("delete", ["del", "d"]);
|
||||
|
|
@ -20,19 +20,16 @@ pub fn cmds() -> impl Iterator<Item = Command> {
|
|||
};
|
||||
|
||||
[
|
||||
apply_edit(command!(edit, Optional(MessageRef), new_content_param => "message_edit")),
|
||||
command!(reproxy, Optional(("msg", MessageRef)), ("member", MemberRef) => "message_reproxy")
|
||||
.help("Reproxies a message with a different member"),
|
||||
command!(message, author => "message_author").help("Shows the author of a proxied message"),
|
||||
command!(message, delete => "message_delete").help("Deletes a proxied message"),
|
||||
apply_edit(command!(message, edit, new_content_param => "message_edit")),
|
||||
command!(message => "message_info")
|
||||
.flag(delete)
|
||||
.flag(author)
|
||||
.help("Shows information about a proxied message"),
|
||||
command!(message, author => "message_author").help("Shows the author of a proxied message"),
|
||||
command!(message, delete => "message_delete").help("Deletes a proxied message"),
|
||||
apply_edit(command!(message, edit, new_content_param => "message_edit_specified")),
|
||||
apply_edit(command!(edit, Skip(MessageRef), new_content_param => "message_edit_specified")),
|
||||
apply_edit(command!(edit, new_content_param => "message_edit")),
|
||||
command!(reproxy, ("member", MemberRef) => "message_reproxy")
|
||||
.help("Reproxies a message with a different member"),
|
||||
command!(reproxy, ("msg", MessageRef), ("member", MemberRef) => "message_reproxy_specified")
|
||||
.help("Reproxies a message with a different member"),
|
||||
]
|
||||
.into_iter()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue