From c901c6043443c834de1f3cc9adc672aed476d92b Mon Sep 17 00:00:00 2001 From: idranme <96647698+idranme@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:11:26 +0000 Subject: [PATCH] fix C2C_MESSAGE_CREATE --- adapters/qq/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/qq/src/utils.ts b/adapters/qq/src/utils.ts index fddd2a71..bd280d99 100644 --- a/adapters/qq/src/utils.ts +++ b/adapters/qq/src/utils.ts @@ -54,7 +54,7 @@ export function decodeGroupMessage( if (!payload) return message const date = data.timestamp.slice(0, data.timestamp.indexOf('m=')).trim().replace(/\+(\d{4}) CST/, 'GMT+$1') payload.timestamp = new Date(date).valueOf() - payload.guild = { id: data.group_id } + payload.guild = data.group_id && { id: data.group_id } payload.user = { id: data.author.id, avatar: `https://q.qlogo.cn/qqapp/${bot.config.id}/${data.author.id}/640` } return message }