mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
fix: update error
This commit is contained in:
parent
18bae72c50
commit
a50a5b52cd
1 changed files with 3 additions and 3 deletions
|
|
@ -214,7 +214,7 @@ export class ChatgptManagement extends plugin {
|
||||||
e.reply('正在执行更新操作,请稍等')
|
e.reply('正在执行更新操作,请稍等')
|
||||||
}
|
}
|
||||||
const _path = process.cwd()
|
const _path = process.cwd()
|
||||||
exec(command, { cwd: `${_path}/plugins/miao-plugin/` }, async function (error, stdout, stderr) {
|
exec(command, { cwd: `${_path}/plugins/chatgpt-plugin/` }, async function (error, stdout, stderr) {
|
||||||
if (/(Already up[ -]to[ -]date|已经是最新的)/.test(stdout)) {
|
if (/(Already up[ -]to[ -]date|已经是最新的)/.test(stdout)) {
|
||||||
e.reply('目前已经是最新版ChatGPT了~')
|
e.reply('目前已经是最新版ChatGPT了~')
|
||||||
return true
|
return true
|
||||||
|
|
@ -227,8 +227,8 @@ export class ChatgptManagement extends plugin {
|
||||||
timer && clearTimeout(timer)
|
timer && clearTimeout(timer)
|
||||||
|
|
||||||
let data = JSON.stringify({
|
let data = JSON.stringify({
|
||||||
isGroup: !!this.e.isGroup,
|
isGroup: !!e.isGroup,
|
||||||
id: this.e.isGroup ? this.e.group_id : this.e.user_id,
|
id: e.isGroup ? e.group_id : e.user_id,
|
||||||
time: new Date().getTime()
|
time: new Date().getTime()
|
||||||
})
|
})
|
||||||
await redis.set('Yz:restart', data, { EX: 120 })
|
await redis.set('Yz:restart', data, { EX: 120 })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue