fix pk;e taking in id, only take message ref

This commit is contained in:
dawn 2026-01-18 22:09:58 +03:00
parent aec01d6245
commit 5daa4777f5
No known key found for this signature in database
4 changed files with 73 additions and 44 deletions

View file

@ -1,3 +1,5 @@
use command_parser::parameter::MESSAGE_REF;
use super::*;
pub fn debug() -> (&'static str, [&'static str; 1]) {
@ -12,7 +14,7 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
.help("Checks if PluralKit has the required permissions in a channel"),
command!(debug, perms, ("guild", ["g"]), GuildRef => "permcheck_guild")
.help("Checks whether a server's permission setup is correct"),
command!(debug, ("proxy", ["proxying", "proxycheck"]), MessageRef => "message_proxy_check")
command!(debug, ("proxy", ["proxying", "proxycheck"]), MESSAGE_REF => "message_proxy_check")
.help("Checks why a message has not been proxied"),
]
}

View file

@ -1,7 +1,9 @@
use command_parser::parameter::{MESSAGE_LINK, MESSAGE_REF};
use super::*;
pub fn cmds() -> impl IntoIterator<Item = Command> {
let message = tokens!(("message", ["msg", "messageinfo"]), Optional(MessageRef));
let message = tokens!(("message", ["msg", "messageinfo"]), Optional(MESSAGE_REF));
let author = ("author", ["sender", "a"]);
let delete = ("delete", ["del", "d"]);
@ -20,8 +22,8 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
};
[
apply_edit(command!(edit, Optional(MessageRef), new_content_param => "message_edit")),
command!(reproxy, Optional(("msg", MessageRef)), ("member", MemberRef) => "message_reproxy")
apply_edit(command!(edit, Optional(MESSAGE_LINK), new_content_param => "message_edit")),
command!(reproxy, Optional(("msg", MESSAGE_REF)), ("member", MemberRef) => "message_reproxy")
.help("Reproxies a previously proxied 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"),