mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix
This commit is contained in:
parent
7431814d1e
commit
9c41251164
2 changed files with 2 additions and 2 deletions
|
|
@ -124,7 +124,7 @@ export function createCRUDCommandRules (cmdPrefix, name, variable, detail = true
|
||||||
this[`importCloud${upperVariable}`] = async function (e) {
|
this[`importCloud${upperVariable}`] = async function (e) {
|
||||||
const id = e.msg.replace(new RegExp(cmdPrefix + `导入${name}`), '')
|
const id = e.msg.replace(new RegExp(cmdPrefix + `导入${name}`), '')
|
||||||
if (id) {
|
if (id) {
|
||||||
const instance = await manager.getInstanceByCloudId(id)
|
const instance = manager.getInstanceByCloudId ? (await manager.getInstanceByCloudId(id)) : (await manager.getInstanceTByCloudId(id))
|
||||||
if (instance) {
|
if (instance) {
|
||||||
e.reply(`${name}已存在,尝试导入最新版本`, true)
|
e.reply(`${name}已存在,尝试导入最新版本`, true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ export async function getGroupContextPrompt (e, length) {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
.replace('${message.sender.title}', sender.title || '-')
|
.replace('${message.sender.title}', sender.title || '-')
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
.replace('${message.time}', formatTimeToBeiJing(chat.time) || '-')
|
.replace('${message.time}', chat.time ? formatTimeToBeiJing(chat.time) : '-')
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
.replace('${message.messageId}', chat.messageId || '-')
|
.replace('${message.messageId}', chat.messageId || '-')
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue