mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 兼容性修复
This commit is contained in:
parent
4c737d5728
commit
59ab8df658
24 changed files with 70 additions and 349 deletions
|
|
@ -23,16 +23,16 @@ export class SendDiceTool extends AbstractTool {
|
|||
const defaultTarget = e.isGroup ? e.group_id : e.sender.user_id
|
||||
const target = isNaN(targetGroupIdOrQQNumber) || !targetGroupIdOrQQNumber
|
||||
? defaultTarget
|
||||
: parseInt(targetGroupIdOrQQNumber) === Bot.uin ? defaultTarget : parseInt(targetGroupIdOrQQNumber)
|
||||
let groupList = await Bot.getGroupList()
|
||||
: parseInt(targetGroupIdOrQQNumber) === e.bot.uin ? defaultTarget : parseInt(targetGroupIdOrQQNumber)
|
||||
let groupList = await e.bot.getGroupList()
|
||||
num = isNaN(num) || !num ? 1 : num > 5 ? 5 : num
|
||||
if (groupList.get(target)) {
|
||||
let group = await Bot.pickGroup(target, true)
|
||||
let group = await e.bot.pickGroup(target, true)
|
||||
for (let i = 0; i < num; i++) {
|
||||
await group.sendMsg(segment.dice())
|
||||
}
|
||||
} else {
|
||||
let friend = await Bot.pickFriend(target)
|
||||
let friend = await e.bot.pickFriend(target)
|
||||
await friend.sendMsg(segment.dice())
|
||||
}
|
||||
if (num === 5) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue