mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
fix message edit commands, parse DM message links for ids
This commit is contained in:
parent
134855f8f8
commit
a307dd37c4
6 changed files with 74 additions and 47 deletions
|
|
@ -7,7 +7,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
|
|||
let delete = ("delete", ["del", "d"]);
|
||||
let reproxy = ("reproxy", ["rp", "crimes", "crime"]);
|
||||
|
||||
let edit = tokens!(("edit", ["e"]), ("new_content", OpaqueStringRemainder));
|
||||
let edit = ("edit", ["e"]);
|
||||
let apply_edit = |cmd: Command| {
|
||||
cmd.flag(("append", ["a"]))
|
||||
.flag(("prepend", ["p"]))
|
||||
|
|
@ -25,8 +25,9 @@ pub fn cmds() -> impl Iterator<Item = Command> {
|
|||
.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 => "message_edit")),
|
||||
apply_edit(command!(edit => "message_edit")),
|
||||
apply_edit(command!(message, edit, ("new_content", OpaqueStringRemainder) => "message_edit_specified")),
|
||||
apply_edit(command!(edit, Skip(MessageRef), ("new_content", OpaqueStringRemainder) => "message_edit_specified")),
|
||||
apply_edit(command!(edit, ("new_content", OpaqueStringRemainder) => "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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue