Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
fix toCqcode
Browse files Browse the repository at this point in the history
  • Loading branch information
takayama-lily committed May 17, 2022
1 parent 338554e commit 6ae4f1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/message/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function genCqcode(content: MessageElem[]) {
continue
}
const tmp = { ...elem } as Partial<MessageElem>
tmp.type = undefined
delete tmp.type
const str = qs.stringify(tmp as NodeJS.Dict<any>, ",", "=", { encodeURIComponent: (s) => s.replace(/&|,|\[|\]/g, escapeCQInside) })
cqcode += "[CQ:" + elem.type + (str ? "," : "") + str + "]"
}
Expand Down

0 comments on commit 6ae4f1c

Please sign in to comment.