diff --git a/apps/groupAdmin/groupAnnounce.js b/apps/groupAdmin/groupAnnounce.js index 540db7b..7b5bb9a 100644 --- a/apps/groupAdmin/groupAnnounce.js +++ b/apps/groupAdmin/groupAnnounce.js @@ -9,15 +9,15 @@ export class GroupAnnounce extends plugin { priority: 500, rule: [ { - reg: "^#发群公告", + reg: "^#发群?公告", fnc: "AddAnnounce" }, { - reg: "^#删群公告(\\d+)$", + reg: "^#删群?公告(\\d+)$", fnc: "DelAnnounce" }, { - reg: "^#查群公告$", + reg: "^#查群?公告$", fnc: "GetAnnounce" } ] @@ -28,7 +28,7 @@ export class GroupAnnounce extends plugin { async AddAnnounce(e) { if (!common.checkPermission(e, "admin", "admin")) { return true } // 获取发送的内容 - let msg = e.msg.replace(/#发群公告/g, "").trim() + let msg = e.msg.replace(/#发群?公告/g, "").trim() if (!msg) return e.reply("❎ 公告不能为空") let result = await new QQApi(e).setAnnounce(e.group_id, msg) @@ -49,7 +49,7 @@ export class GroupAnnounce extends plugin { // 删群公告 async DelAnnounce(e) { if (!common.checkPermission(e, "admin", "admin")) { return true } - let msg = e.msg.replace(/#删群公告/g, "").trim() + let msg = e.msg.replace(/#删群?公告/g, "").trim() if (!msg) return e.reply("❎ 序号不可为空") let result = await new QQApi(e).delAnnounce(e.group_id, msg) if (!result) return e.reply(API_ERROR) diff --git a/model/State/BotState.js b/model/State/BotState.js index 797b75e..d5602cc 100644 --- a/model/State/BotState.js +++ b/model/State/BotState.js @@ -14,7 +14,7 @@ export default async function getBotState(e) { const { nickname = "未知", status = 11, apk, version } = bot // 头像 - const avatarUrl = bot.avatar ?? (Number(bot.uin) ? `https://q1.qlogo.cn/g?b=qq&s=0&nk=${bot.uin}` : "default") + const avatarUrl = bot.avatar ?? (Number(bot.uin) ? `https://q1.qlogo.cn/g?b=qq&s=3&nk=${bot.uin}` : "default") const avatar = await getAvatarColor(avatarUrl) const verKey = e.isPro ? "version" : "ver" diff --git a/resources/state/index.html b/resources/state/index.html index 634c9eb..f31a2b5 100644 --- a/resources/state/index.html +++ b/resources/state/index.html @@ -16,6 +16,7 @@ var Config = JSON.parse('{{@Config}}') var _res_path = '{{_res_path}}' + {{each BotStatusList}}
@@ -45,30 +46,22 @@

- {{if $value.countContacts.friend}} - - {{$value.countContacts.friend}} - {{/if}} - {{if $value.countContacts.group}} - - {{$value.countContacts.group}} - {{/if}} - {{if $value.countContacts.groupMember}} - - {{$value.countContacts.groupMember}} - {{/if}} - {{if $value.messageCount.recv}} - - {{$value.messageCount.recv}} - {{/if}} - {{if $value.messageCount.sent}} - - {{$value.messageCount.sent}} - {{/if}} - {{if $value.messageCount.screenshot}} - - {{$value.messageCount.screenshot}} - {{/if}} + {{each $value.countContacts v i}} + {{if v}} + + + {{v}} + + {{/if}} + {{/each}} + {{each $value.messageCount v i}} + {{if v}} + + + {{v}} + + {{/if}} + {{/each}}

@@ -129,8 +122,6 @@ {{/if}} - - {{if chartData}}