diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b2ba4..6f8a4ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # 1.4.1 -* **优化**椰奶状态 - * 修改格式 - * 美化样式 - * 重构代码 +* 新增`#投票禁言`功能ⁿᵉʷ +* `椰奶状态`背景图API请求失败使用默认背景图 +* 新增`群管白名单`功能ⁿᵉʷ + * 白名单用户可以不被群管功能操作 + * 包括(椰奶群管|椰奶违禁词|椰奶进群验证) + * 使用`#群管加白|删白@QQ`可快速增删白名单 + * 发送`#开启白名单自动解禁`可在白名单用户被禁言时自动解禁 + * **主人可以无视白名单** +* 新增`取头像`可获取头像地址ⁿᵉʷ +* 局部重构椰奶状态 * 删除匿名相关功能 diff --git a/apps/groupAdmin/groupAdmin.js b/apps/groupAdmin/groupAdmin.js index 86968df..0ae7a70 100644 --- a/apps/groupAdmin/groupAdmin.js +++ b/apps/groupAdmin/groupAdmin.js @@ -145,6 +145,10 @@ export class GroupAdmin extends plugin { { reg: "^#?群管(加|删)白(名单)?", fnc: "whiteQQ" + }, + { + reg: "^#?(开启|关闭)白名单(自动)?解禁", + fnc: "noBan" } ] }) @@ -707,7 +711,7 @@ export class GroupAdmin extends plugin { let type = /加/.test(this.e.msg) ? "add" : "del" let qq = this.e.at || (this.e.msg.match(/\d+/)?.[0] || "") qq = Number(qq) || String(qq) - + if (!qq) return this.reply("❎ 请艾特或输入需要加白的QQ") const { whiteQQ } = Config.groupAdmin @@ -719,4 +723,16 @@ export class GroupAdmin extends plugin { Config.modifyarr("groupAdmin", "whiteQQ", qq, type) this.reply(`✅ 已${type === "add" ? "加入" : "删除"}${qq}到群管白名单`) } + + async noBan () { + if (!common.checkPermission(this.e, "master")) return + let type = !!/开启/.test(this.e.msg) + + const { noBan } = Config.groupAdmin + if (noBan && type) return this.reply("❎ 白名单自动解禁已处于开启状态") + if (!noBan && !type) return this.reply("❎ 白名单自动解禁已处于关闭状态") + + Config.modify("groupAdmin", "noBan", type) + this.reply(`✅ 已${type ? "开启" : "关闭"}白名单自动解禁`) + } } diff --git a/apps/groupAdmin/voteBan.js b/apps/groupAdmin/voteBan.js index 8a14037..6c1d3a5 100644 --- a/apps/groupAdmin/voteBan.js +++ b/apps/groupAdmin/voteBan.js @@ -71,7 +71,7 @@ export class NewGroupVerify extends plugin { // 处理结果 if (!Vote[key]) return const { supportCount, opposeCount } = Vote[key] - let msg = `投票结束,投票结果:\n支持票数${supportCount}\n反对票数${opposeCount}\n` + let msg = `投票结束,投票结果:\n支持票数:${supportCount}\n反对票数:${opposeCount}\n` if (supportCount > opposeCount && supportCount >= 3) { msg += "支持票数大于反对票\n执行禁言操作" await e.group.muteMember(targetQQ, 3600)