mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: add more debug log
This commit is contained in:
parent
877b91c765
commit
a94017e6e5
4 changed files with 21 additions and 14 deletions
|
|
@ -2,27 +2,27 @@ import { AbstractTool } from './AbstractTool.js'
|
|||
import { convertFaces } from '../face.js'
|
||||
|
||||
export class SendMessageToSpecificGroupOrUserTool extends AbstractTool {
|
||||
name = 'sendMessageToSpecificGroupOrUser'
|
||||
name = 'sendMessage'
|
||||
|
||||
parameters = {
|
||||
properties: {
|
||||
msg: {
|
||||
type: 'string',
|
||||
description: 'Message text to be sent'
|
||||
description: 'text to be sent'
|
||||
},
|
||||
targetGroupIdOrQQNumber: {
|
||||
target: {
|
||||
type: 'string',
|
||||
description: 'Fill in the target user\'s qq number or groupId when you need to send specific message to specific user or group, otherwise leave blank'
|
||||
description: 'target qq or group number'
|
||||
}
|
||||
},
|
||||
required: ['msg', 'msgType', 'targetGroupIdOrQQNumber']
|
||||
required: ['msg', 'target']
|
||||
}
|
||||
|
||||
func = async function (opt, e) {
|
||||
let { msg, targetGroupIdOrQQNumber } = opt
|
||||
const target = isNaN(targetGroupIdOrQQNumber) || !targetGroupIdOrQQNumber
|
||||
let { msg, target } = opt
|
||||
target = isNaN(target) || !target
|
||||
? e.isGroup ? e.group_id : e.sender.user_id
|
||||
: parseInt(targetGroupIdOrQQNumber.trim())
|
||||
: parseInt(target.trim())
|
||||
|
||||
let groupList = await Bot.getGroupList()
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue