mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: reg
This commit is contained in:
parent
60f6ccb2d2
commit
7431814d1e
1 changed files with 2 additions and 3 deletions
|
|
@ -122,9 +122,8 @@ export function createCRUDCommandRules (cmdPrefix, name, variable, detail = true
|
||||||
fnc: `importCloud${upperVariable}`
|
fnc: `importCloud${upperVariable}`
|
||||||
})
|
})
|
||||||
this[`importCloud${upperVariable}`] = async function (e) {
|
this[`importCloud${upperVariable}`] = async function (e) {
|
||||||
const match = e.msg.match(new RegExp(cmdPrefix + `导入${name}`))
|
const id = e.msg.replace(new RegExp(cmdPrefix + `导入${name}`), '')
|
||||||
if (match) {
|
if (id) {
|
||||||
const id = match[1].trim()
|
|
||||||
const instance = await manager.getInstanceByCloudId(id)
|
const instance = await manager.getInstanceByCloudId(id)
|
||||||
if (instance) {
|
if (instance) {
|
||||||
e.reply(`${name}已存在,尝试导入最新版本`, true)
|
e.reply(`${name}已存在,尝试导入最新版本`, true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue