修复trss不支持sendPrivateMsg的问题

This commit is contained in:
zyc404 2023-10-08 18:34:41 +08:00
parent 880edace8a
commit 5d5535ed6e
2 changed files with 16 additions and 4 deletions

View file

@ -46,7 +46,11 @@ async function User(fastify, options) {
{ EX: 60000 }
)
const master = (await getMasterQQ())[0]
Bot.sendPrivateMsg(master, `收到工具箱快捷登录请求1分钟内有效${otp}`, false)
if (Array.isArray(Bot.uin)) {
Bot.pickFriend(master).sendMsg(`收到工具箱快捷登录请求1分钟内有效${otp}`)
} else {
Bot.sendPrivateMsg(master, `收到工具箱快捷登录请求1分钟内有效${otp}`, false)
}
reply.send({ state: true })
return reply
})