diff --git a/apps/chat.js b/apps/chat.js index 13ba2d3..90ae1c2 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -756,12 +756,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 diff --git a/apps/entertainment.js b/apps/entertainment.js index 3d767b0..88fe1ee 100644 --- a/apps/entertainment.js +++ b/apps/entertainment.js @@ -215,13 +215,13 @@ ${translateLangLabels} const regExp = /词云(\d{0,2})(|h)/ const match = e.msg.trim().match(regExp) const duration = !match[1] ? 12 : parseInt(match[1]) // default 12h - + if(duration > 24) { await e.reply('最多只能统计24小时内的记录哦') return false } await e.reply('在统计啦,请稍等...') - + await redis.set(`CHATGPT:WORDCLOUD:${groupId}`, '1', {EX: 600}) try { await makeWordcloud(e, e.group_id, duration) diff --git a/apps/management.js b/apps/management.js index f6be28b..df7f1d5 100644 --- a/apps/management.js +++ b/apps/management.js @@ -313,9 +313,7 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务, roleList = getVoicevoxRoleList() break case 'azure': - if (matchCommand[2] === 'azure') { - roleList = getAzureRoleList() - } + roleList = getAzureRoleList() break default: break diff --git a/guoba.support.js b/guoba.support.js index 85e2fe1..ea4c1c0 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -798,7 +798,7 @@ export function supportGuoba () { setConfigData (data, { Result }) { for (let [keyPath, value] of Object.entries(data)) { // 处理黑名单 - if (keyPath === 'blockWords' || keyPath === 'promptBlockWords' || keyPath === 'initiativeChatGroups') { value = value.toString().split(/[,,;;\|]/) } + if (keyPath === 'blacklist' || keyPath === 'whitelist' || keyPath === 'blockWords' || keyPath === 'promptBlockWords' || keyPath === 'initiativeChatGroups') { value = value.toString().split(/[,,;;\|]/) } if (Config[keyPath] !== value) { Config[keyPath] = value } } // 正确储存azureRoleSelect结果