fix #I7EBCY
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { common } from '../../model/index.js'
|
||||
import { Config } from '../../components/index.js'
|
||||
|
||||
Bot.on('internal.input', async (e) => {
|
||||
Bot.on?.('internal.input', async (e) => {
|
||||
if (!Config.whole.input) return false
|
||||
// 判断是否主人消息
|
||||
if (Config.masterQQ.includes(e.user_id)) return false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { common } from '../../model/index.js'
|
||||
import { Config } from '../../components/index.js'
|
||||
|
||||
Bot.on('message', async (e) => {
|
||||
Bot.on?.('message', async (e) => {
|
||||
// 判断是否为机器人消息
|
||||
if (e.user_id == (e.bot ?? Bot).uin) return false
|
||||
// 判断是否主人消息
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { common } from '../../model/index.js'
|
||||
import { Config } from '../../components/index.js'
|
||||
|
||||
Bot.on('notice.friend', async (e) => {
|
||||
Bot.on?.('notice.friend', async (e) => {
|
||||
let msg
|
||||
let forwardMsg
|
||||
switch (e.sub_type) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { common } from '../../model/index.js'
|
||||
import { Config } from '../../components/index.js'
|
||||
import moment from 'moment'
|
||||
|
||||
Bot.on('notice.group', async (e) => {
|
||||
Bot.on?.('notice.group', async (e) => {
|
||||
let msg
|
||||
let forwardMsg
|
||||
switch (e.sub_type) {
|
||||
|
||||
@@ -7,7 +7,7 @@ const ROLE_MAP = {
|
||||
member: '群员'
|
||||
}
|
||||
|
||||
Bot.on('request', async (e) => {
|
||||
Bot.on?.('request', async (e) => {
|
||||
let msg = ''
|
||||
switch (e.request_type) {
|
||||
case 'group':
|
||||
|
||||
@@ -128,7 +128,7 @@ export class NewGroupVerify extends plugin {
|
||||
}
|
||||
|
||||
// 进群监听
|
||||
Bot.on('notice.group.increase', async (e) => {
|
||||
Bot.on?.('notice.group.increase', async (e) => {
|
||||
logger.mark(`[Yenai-Plugin][进群验证]收到${e.user_id}的进群事件`)
|
||||
let { openGroup, DelayTime } = Config.groupverify
|
||||
|
||||
@@ -142,7 +142,7 @@ Bot.on('notice.group.increase', async (e) => {
|
||||
})
|
||||
|
||||
// 答案监听
|
||||
Bot.on('message', async (e) => {
|
||||
Bot.on?.('message', async (e) => {
|
||||
if (!e.isGroup) return false
|
||||
|
||||
let { openGroup, mode, SuccessMsgs } = Config.groupverify
|
||||
@@ -188,7 +188,7 @@ Bot.on('message', async (e) => {
|
||||
})
|
||||
|
||||
// 主动退群
|
||||
Bot.on('notice.group.decrease', async (e) => {
|
||||
Bot.on?.('notice.group.decrease', async (e) => {
|
||||
if (!e.group.is_admin && !e.group.is_owner) return
|
||||
|
||||
if (!temp[e.user_id + e.group_id]) return
|
||||
|
||||
@@ -78,7 +78,7 @@ async function help (e) {
|
||||
element: 'default'
|
||||
}, {
|
||||
e,
|
||||
scale: 1.6
|
||||
scale: 1.2
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user