-
Notifications
You must be signed in to change notification settings - Fork 0
/
onset.js
39 lines (37 loc) · 1.07 KB
/
onset.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {getComplaint} from './OnsetQuotes.js'
export class ReplyComplaint extends plugin {
constructor() {
super({
name: '发病回复',
dsc: '艾特机器人,不要加任何消息,回复发病文',
event: 'message',
priority: 666,
rule: [
{
reg: /.*/i,
fnc: 'Complaint',
log:false
}, {
reg: /#?(发病|发电|发癫|发疯)/,
fnc: 'Complaint'
},
]
})
}
async Complaint(e) {
if (e.atBot && !e.msg) {
await this.ReplyComplaint(e)
} else if (e.msg === '#发病') {
await this.ReplyComplaint(e)
} else {
return false
}
}
async ReplyComplaint(e) {
let Name = e.sender.nickname || e.sender.card
let Complaint = await getComplaint()
let Reply = Complaint.replace(/{target_name}/g, Name)
await e.reply(Reply)
return true
}
}