fix: 工具私聊

This commit is contained in:
ikechan8370 2025-02-12 15:43:37 +08:00
parent 8417008c38
commit 2ad77d8112
4 changed files with 19 additions and 6 deletions

View file

@ -37,8 +37,11 @@ export class SendDiceTool extends AbstractTool {
await group.sendMsg(segment.dice())
}
} else {
let friend = await e.bot.pickFriend(target)
await friend.sendMsg(segment.dice())
let user = e.bot.pickUser(target)
if (e.group_id) {
user = user.asMember(e.group_id)
}
await user.sendMsg(segment.dice())
}
if (num === 5) {
logger.warn(1)