Merge branch 'v2' into wip2.7

This commit is contained in:
ikechan8370 2023-06-25 01:04:44 +08:00 committed by GitHub
commit 7f799b657c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 358 additions and 183 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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('配置文件错误')