Miao-Yunzai/apps/event/disFriPoke.ts

24 lines
582 B
TypeScript
Raw Permalink Normal View History

2024-06-11 22:10:46 +08:00
import { ConfigController as cfg } from 'yunzai/config'
2024-06-12 10:47:19 +08:00
import { Plugin } from 'yunzai/core'
export class disFriPoke extends Plugin {
2024-06-17 22:52:15 +08:00
constructor() {
/**
2024-06-11 21:03:42 +08:00
name: '禁止私聊',
dsc: '对私聊禁用做处理当开启私聊禁用时只接收cookie以及抽卡链接',
2024-06-12 10:47:19 +08:00
*/
2024-06-17 22:52:15 +08:00
super()
this.event = 'notice.friend.poke'
this.priority = 0
}
/**
* default
* @returns
*/
async accept() {
if (!cfg.other?.disablePrivate) return
if (this.e.isMaster) return
this.e.reply(cfg.other.disableMsg)
return 'return'
}
}