mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
fix: update sr
This commit is contained in:
parent
7e559881eb
commit
fc029de75c
1 changed files with 9 additions and 1 deletions
|
|
@ -21,12 +21,20 @@ export class QueryStarRailTool extends AbstractTool {
|
||||||
required: ['qq', 'groupId']
|
required: ['qq', 'groupId']
|
||||||
}
|
}
|
||||||
|
|
||||||
func = async function (opts) {
|
func = async function (opts, e) {
|
||||||
let { qq, groupId, uid } = opts
|
let { qq, groupId, uid } = opts
|
||||||
|
if (e.at === Bot.uin) {
|
||||||
|
e.at = null
|
||||||
|
}
|
||||||
|
e.atBot = false
|
||||||
|
|
||||||
if (!uid) {
|
if (!uid) {
|
||||||
try {
|
try {
|
||||||
let { Panel } = await import('../../../StarRail-plugin/apps/panel.js')
|
let { Panel } = await import('../../../StarRail-plugin/apps/panel.js')
|
||||||
uid = await redis.get(`STAR_RAILWAY:UID:${qq}`)
|
uid = await redis.get(`STAR_RAILWAY:UID:${qq}`)
|
||||||
|
let panel = new Panel(e)
|
||||||
|
e.msg = '*面板' + uid
|
||||||
|
panel.panel(e).catch(e => logger.warn(e))
|
||||||
if (!uid) {
|
if (!uid) {
|
||||||
return '用户没有绑定uid,无法查询。可以让用户主动提供uid进行查询'
|
return '用户没有绑定uid,无法查询。可以让用户主动提供uid进行查询'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue