mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: import bug
This commit is contained in:
parent
cee033dc5e
commit
719a810aca
2 changed files with 3 additions and 2 deletions
|
|
@ -60,13 +60,14 @@ export class Entertainment extends plugin {
|
|||
let lock = await redis.get('CHATGPT:WORDCLOUD:ALL')
|
||||
if (lock) {
|
||||
await e.reply('别着急,上次统计还没完呢')
|
||||
return
|
||||
return true
|
||||
}
|
||||
await e.reply('在统计啦,请稍等...')
|
||||
await redis.set('CHATGPT:WORDCLOUD:ALL', '1', { EX: 600 })
|
||||
try {
|
||||
await makeWordcloud(e, e.group_id)
|
||||
} catch (err) {
|
||||
logger.error(err)
|
||||
await e.reply(err)
|
||||
}
|
||||
await redis.del('CHATGPT:WORDCLOUD:ALL')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Config } from '../config.js'
|
|||
|
||||
let nodejieba
|
||||
try {
|
||||
nodejieba = await import('nodejieba').default
|
||||
nodejieba = (await import('nodejieba')).default
|
||||
} catch (err) {
|
||||
logger.info('未安装nodejieba,娱乐功能-词云统计不可用')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue