style: 简化写法

This commit is contained in:
手瓜一十雪 committed 2024-12-02 11:16:12 +08:00
1 parent 073860e70a
commit 59ddb84cb1
5 files changed
+13 -14

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ class ForwardSingleMsg extends OneBotAction<Payload, null> {
}
async _handle(payload: Payload): Promise<null> {
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
const msg = MessageUnique.getMsgIdAndPeerByShortId(+payload.message_id);
if (!msg) {
throw new Error(`无法找到消息${payload.message_id}`);
}