mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: at
element
This commit is contained in:
parent
6bb4a8fe69
commit
2b0aa6249b
@ -73,7 +73,7 @@ export class NTQQGroupApi extends Service {
|
||||
cbCmd: 'nodeIKernelGroupListener/onMemberInfoChange',
|
||||
afterFirstCmd: false,
|
||||
cmdCB: payload => payload.members.has(uid),
|
||||
timeout: 3000
|
||||
timeout: 2000
|
||||
}
|
||||
)
|
||||
return data.members.get(uid)!
|
||||
|
@ -67,8 +67,15 @@ export async function createSendElements(
|
||||
}
|
||||
else if (peer.chatType === ChatType.Group) {
|
||||
const uid = await ctx.ntUserApi.getUidByUin(atQQ) ?? ''
|
||||
const atNmae = sendMsg.data?.name
|
||||
const display = atNmae ? `@${atNmae}` : ''
|
||||
let display = ''
|
||||
if (sendMsg.data.name) {
|
||||
display = `@${sendMsg.data.name}`
|
||||
} else {
|
||||
try {
|
||||
const member = await ctx.ntGroupApi.getGroupMember(peer.peerUid, uid)
|
||||
display = `@${member.cardName || member.nick}`
|
||||
} catch { }
|
||||
}
|
||||
sendElements.push(SendElement.at(atQQ, uid, AtType.One, display))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user