parent
c3efed3c53
commit
815613bbbe
|
@ -126,6 +126,8 @@ export class mysNews extends plugin {
|
||||||
model = '关闭'
|
model = '关闭'
|
||||||
msg += `${model}`
|
msg += `${model}`
|
||||||
cfg[type][this.e.self_id] = lodash.difference(cfg[type][this.e.self_id], [this.e.group_id])
|
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)
|
let yaml = YAML.stringify(cfg)
|
||||||
|
|
|
@ -257,14 +257,13 @@ export default class MysNews extends base {
|
||||||
return this.replyMsg(img, `${param.data.post.subject}`)
|
return this.replyMsg(img, `${param.data.post.subject}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
replyMsg(img, title = '') {
|
replyMsg(img, title) {
|
||||||
if (!img || img.length <= 0) return false
|
if (!img || img.length <= 0) return false
|
||||||
if (img.length == 1) {
|
if (img.length == 1) {
|
||||||
if (title) img.unshift(title)
|
if (title) return [title, ...img]
|
||||||
return img
|
return img
|
||||||
} else {
|
|
||||||
return common.makeForwardMsg(this.e, img, title)
|
|
||||||
}
|
}
|
||||||
|
return common.makeForwardMsg(this.e, img, title)
|
||||||
}
|
}
|
||||||
|
|
||||||
async mysNewsTask() {
|
async mysNewsTask() {
|
||||||
|
|
Loading…
Reference in New Issue