diff --git a/plugins/genshin/apps/mysNews.js b/plugins/genshin/apps/mysNews.js index 7c5eb19..850fc17 100644 --- a/plugins/genshin/apps/mysNews.js +++ b/plugins/genshin/apps/mysNews.js @@ -126,6 +126,8 @@ export class mysNews extends plugin { model = '关闭' msg += `${model}` cfg[type][this.e.self_id] = lodash.difference(cfg[type][this.e.self_id], [this.e.group_id]) + if (lodash.isEmpty(cfg[type][this.e.self_id])) + delete cfg[type][this.e.self_id] } let yaml = YAML.stringify(cfg) diff --git a/plugins/genshin/model/mysNews.js b/plugins/genshin/model/mysNews.js index 96132c6..be5f601 100644 --- a/plugins/genshin/model/mysNews.js +++ b/plugins/genshin/model/mysNews.js @@ -257,14 +257,13 @@ export default class MysNews extends base { return this.replyMsg(img, `${param.data.post.subject}`) } - replyMsg(img, title = '') { + replyMsg(img, title) { if (!img || img.length <= 0) return false if (img.length == 1) { - if (title) img.unshift(title) + if (title) return [title, ...img] return img - } else { - return common.makeForwardMsg(this.e, img, title) } + return common.makeForwardMsg(this.e, img, title) } async mysNewsTask() {