This commit is contained in:
ikechan8370 2025-04-07 20:02:24 +08:00
parent 7431814d1e
commit 9c41251164
2 changed files with 2 additions and 2 deletions

View file

@ -124,7 +124,7 @@ export function createCRUDCommandRules (cmdPrefix, name, variable, detail = true
this[`importCloud${upperVariable}`] = async function (e) {
const id = e.msg.replace(new RegExp(cmdPrefix + `导入${name}`), '')
if (id) {
const instance = await manager.getInstanceByCloudId(id)
const instance = manager.getInstanceByCloudId ? (await manager.getInstanceByCloudId(id)) : (await manager.getInstanceTByCloudId(id))
if (instance) {
e.reply(`${name}已存在,尝试导入最新版本`, true)
}

View file

@ -133,7 +133,7 @@ export async function getGroupContextPrompt (e, length) {
// eslint-disable-next-line no-template-curly-in-string
.replace('${message.sender.title}', sender.title || '-')
// 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
.replace('${message.messageId}', chat.messageId || '-')
// eslint-disable-next-line no-template-curly-in-string