fix: 修复lain下部分工具失效问题

This commit is contained in:
ikechan8370 2023-11-07 19:59:10 +08:00
parent e43b490edb
commit ce65cc862f
6 changed files with 36 additions and 7 deletions

View file

@ -102,7 +102,12 @@ export class SendAudioMessageTool extends AbstractTool {
return `audio generation failed, error: ${JSON.stringify(err)}`
}
if (sendable) {
let groupList = await e.bot.getGroupList()
let groupList
try {
groupList = await e.bot.getGroupList()
} catch (err) {
groupList = e.bot.gl
}
try {
if (groupList.get(target)) {
let group = await e.bot.pickGroup(target)