mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix
This commit is contained in:
parent
4f9e465fb2
commit
afa06f0760
@ -267,6 +267,12 @@ export class NTQQMsgApi extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async generateMsgUniqueId(chatType: number) {
|
async generateMsgUniqueId(chatType: number) {
|
||||||
return await invoke('nodeIKernelMsgService/generateMsgUniqueId', [{ chatType }])
|
const uniqueId = await invoke('nodeIKernelMsgService/generateMsgUniqueId', [{ chatType }])
|
||||||
|
if (typeof uniqueId === 'string') {
|
||||||
|
return uniqueId
|
||||||
|
} else {
|
||||||
|
const random = Math.trunc(Math.random() * 100)
|
||||||
|
return `${Date.now()}${random}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user