mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
Merge branch 'v2' into wip2.7
This commit is contained in:
commit
7f799b657c
8 changed files with 358 additions and 183 deletions
|
|
@ -781,12 +781,12 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
// 黑白名单过滤对话
|
||||
let [whitelist, blacklist] = processList(Config.whitelist, Config.blacklist)
|
||||
if (whitelist.length > 0) {
|
||||
if (whitelist.join('').length > 0) {
|
||||
if (e.isGroup && !whitelist.includes(e.group_id.toString())) return false
|
||||
const list = whitelist.filter(elem => elem.startsWith('^')).map(elem => elem.slice(1))
|
||||
if (!list.includes(e.sender.user_id.toString())) return false
|
||||
}
|
||||
if (blacklist.length > 0) {
|
||||
if (blacklist.join('').length > 0) {
|
||||
if (e.isGroup && blacklist.includes(e.group_id.toString())) return false
|
||||
const list = blacklist.filter(elem => elem.startsWith('^')).map(elem => elem.slice(1))
|
||||
if (list.includes(e.sender.user_id.toString())) return false
|
||||
|
|
|
|||
|
|
@ -215,9 +215,9 @@ ${translateLangLabels}
|
|||
|
||||
const regExp = /词云(\d{0,2})(|h)/
|
||||
const match = e.msg.trim().match(regExp)
|
||||
const duration = !match[1] ? 12 : parseInt(match[1]) // default 12h
|
||||
const duration = !match[1] ? 12 : parseInt(match[1]) // default 12h
|
||||
|
||||
if (duration > 24) {
|
||||
if(duration > 24) {
|
||||
await e.reply('最多只能统计24小时内的记录哦')
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,9 +316,7 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
|
|||
roleList = getVoicevoxRoleList()
|
||||
break
|
||||
case 'azure':
|
||||
if (matchCommand[2] === 'azure') {
|
||||
roleList = getAzureRoleList()
|
||||
}
|
||||
roleList = getAzureRoleList()
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
|
@ -1458,7 +1456,7 @@ Poe 模式会调用 Poe 中的 Claude-instant 进行对话。需要提供 Cookie
|
|||
})
|
||||
await redis.set('CHATGPT:USE', redisConfig.useMode)
|
||||
}
|
||||
await this.reply(await makeForwardMsg(this.e, changeConfig.map(msg => `修改项:${msg.item}\n旧数据\n\n${msg.url}\n\n新数据\n ${msg.url}`)))
|
||||
await this.reply(await makeForwardMsg(this.e, changeConfig.map(msg => `修改项:${msg.item}\n旧数据\n\n${msg.old}\n\n新数据\n ${msg.value}`)))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
await e.reply('配置文件错误')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue