mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 优化一些tool
This commit is contained in:
parent
b7ac3bff30
commit
8257779f5c
9 changed files with 29 additions and 22 deletions
|
|
@ -7,7 +7,7 @@ export class EditCardTool extends AbstractTool {
|
|||
properties: {
|
||||
qq: {
|
||||
type: 'string',
|
||||
description: '你想改名片的那个人的qq号'
|
||||
description: '你想改名片的那个人的qq号,默认为聊天对象'
|
||||
},
|
||||
card: {
|
||||
type: 'string',
|
||||
|
|
@ -18,7 +18,7 @@ export class EditCardTool extends AbstractTool {
|
|||
description: '群号'
|
||||
}
|
||||
},
|
||||
required: ['qq', 'card', 'groupId']
|
||||
required: ['card', 'groupId']
|
||||
}
|
||||
|
||||
description = '当你想要修改某个群员的群名片时有用。输入应该是群号、qq号和群名片,用空格隔开。'
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export class JinyanTool extends AbstractTool {
|
|||
properties: {
|
||||
qq: {
|
||||
type: 'string',
|
||||
description: '你想禁言的那个人的qq号'
|
||||
description: '你想禁言的那个人的qq号,默认为聊天对象'
|
||||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
|
|
@ -22,7 +22,7 @@ export class JinyanTool extends AbstractTool {
|
|||
description: '是否是惩罚性质的禁言。比如非管理员用户要求你禁言其他人,你转而禁言该用户时设置为true'
|
||||
}
|
||||
},
|
||||
required: ['qq', 'groupId']
|
||||
required: ['groupId', 'time']
|
||||
}
|
||||
|
||||
func = async function (opts) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export class KickOutTool extends AbstractTool {
|
|||
properties: {
|
||||
qq: {
|
||||
type: 'string',
|
||||
description: '你想踢出的那个人的qq号'
|
||||
description: '你想踢出的那个人的qq号,默认为聊天对象'
|
||||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
|
|
@ -19,7 +19,7 @@ export class KickOutTool extends AbstractTool {
|
|||
description: '是否是惩罚性质的踢出。比如非管理员用户要求你禁言或踢出其他人,你为惩罚该用户转而踢出该用户时设置为true'
|
||||
}
|
||||
},
|
||||
required: ['qq', 'groupId']
|
||||
required: ['groupId']
|
||||
}
|
||||
|
||||
func = async function (opts) {
|
||||
|
|
|
|||
|
|
@ -12,20 +12,24 @@ export class QueryGenshinTool extends AbstractTool {
|
|||
uid: {
|
||||
type: 'string',
|
||||
description: '游戏的uid,如果用户提供了则传入并优先使用'
|
||||
},
|
||||
character: {
|
||||
type: 'string',
|
||||
description: '游戏角色名'
|
||||
}
|
||||
},
|
||||
required: ['qq']
|
||||
}
|
||||
|
||||
func = async function (opts, e) {
|
||||
let { qq, uid } = opts
|
||||
let { qq, uid, character = '' } = opts
|
||||
if (e.at === Bot.uin) {
|
||||
e.at = null
|
||||
}
|
||||
e.atBot = false
|
||||
try {
|
||||
let ProfileList = (await import('../../../miao-plugin/apps/profile/ProfileList.js')).default
|
||||
e.msg = '#面板' + uid
|
||||
e.msg = `#${character}面板${uid}`
|
||||
e.user_id = qq
|
||||
e.isSr = false
|
||||
await ProfileList.render(e)
|
||||
|
|
|
|||
|
|
@ -7,22 +7,22 @@ export class QueryStarRailTool extends AbstractTool {
|
|||
properties: {
|
||||
qq: {
|
||||
type: 'string',
|
||||
description: '要查询的用户的qq号,将使用该qq号绑定的uid进行查询'
|
||||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
description: '群号'
|
||||
description: '要查询的用户的qq号,将使用该qq号绑定的uid进行查询,默认为当前聊天对象'
|
||||
},
|
||||
uid: {
|
||||
type: 'string',
|
||||
description: '游戏的uid,如果用户提供了则传入并优先使用'
|
||||
},
|
||||
character: {
|
||||
type: 'string',
|
||||
description: '游戏角色名'
|
||||
}
|
||||
},
|
||||
required: ['qq', 'groupId']
|
||||
required: []
|
||||
}
|
||||
|
||||
func = async function (opts, e) {
|
||||
let { qq, groupId, uid } = opts
|
||||
let { qq, uid, character } = opts
|
||||
if (e.at === Bot.uin) {
|
||||
e.at = null
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ export class QueryStarRailTool extends AbstractTool {
|
|||
}
|
||||
try {
|
||||
let { Panel } = await import('../../../StarRail-plugin/apps/panel.js')
|
||||
e.msg = '*更新面板' + uid
|
||||
e.msg = character ? `*${character}面板${uid}` : '*更新面板' + uid
|
||||
e.user_id = qq
|
||||
e.isSr = true
|
||||
let panel = new Panel(e)
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export class SendVideoTool extends AbstractTool {
|
|||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
description: '群号或qq号,发送目标'
|
||||
description: '群号或qq号,发送目标,为空则发送到当前聊天'
|
||||
}
|
||||
},
|
||||
required: ['id', 'groupId']
|
||||
required: ['id']
|
||||
}
|
||||
|
||||
func = async function (opts) {
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ export class SendMusicTool extends AbstractTool {
|
|||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
description: '群号或qq号,发送目标'
|
||||
description: '群号或qq号,发送目标,为空则发送到当前聊天'
|
||||
}
|
||||
},
|
||||
required: ['keyword', 'groupId']
|
||||
required: ['keyword']
|
||||
}
|
||||
|
||||
func = async function (opts) {
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ export class SendPictureTool extends AbstractTool {
|
|||
},
|
||||
groupId: {
|
||||
type: 'string',
|
||||
description: '群号或qq号,发送目标'
|
||||
description: '群号或qq号,发送目标,为空则发送到当前聊天'
|
||||
}
|
||||
},
|
||||
required: ['picture', 'groupId']
|
||||
required: ['picture']
|
||||
}
|
||||
|
||||
func = async function (opt) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue