适配部分内容

This commit is contained in:
chenyuxin221 2025-04-02 23:49:49 +08:00
parent abf6fa6ac2
commit c82c137596
3 changed files with 6 additions and 3 deletions

View file

@ -109,7 +109,8 @@ export class SendAudioMessageTool extends AbstractTool {
groupList = e.bot.gl
}
try {
if (groupList.get(target)) {
if ((typeof groupList.get === 'function' && groupList.get(target)) ||
(Array.isArray(groupList) && groupList.includes(target))) {
let group = await e.bot.pickGroup(target)
await group.sendMsg(sendable)
return 'audio has been sent to group' + target

View file

@ -34,7 +34,8 @@ export class SendAvatarTool extends AbstractTool {
groupList = e.bot.gl
}
console.log('sendAvatar', target, pictures)
if (groupList.get(target)) {
if ((typeof groupList.get === 'function' && groupList.get(target)) ||
(Array.isArray(groupList) && groupList.includes(target))) {
let group = await e.bot.pickGroup(target)
await group.sendMsg(pictures)
}

View file

@ -34,7 +34,8 @@ export class SendMessageToSpecificGroupOrUserTool extends AbstractTool {
groupList = e.bot.gl
}
try {
if (groupList.get(target)) {
if ((typeof groupList.get === 'function' && groupList.get(target)) ||
(Array.isArray(groupList) && groupList.includes(target))) {
let group = await e.bot.pickGroup(target)
await group.sendMsg(await convertFaces(msg, true, e))
return 'msg has been sent to group' + target