同步 Miao-Yunzai 更新

This commit is contained in:
🌌 2023-05-31 09:55:20 +08:00
parent bd255c2bb4
commit f4f3a1580f
4 changed files with 14 additions and 4 deletions

View File

@ -558,11 +558,11 @@ export default class gocqhttpAdapter {
break
case "channel_updated":
data.notice_type = "guild_channel_updated"
logger.info(`${logger.blue(`[${data.self_id}]`)} 子频道更新:[${data.guild_id}-${data.channel_id}, ${data.user_id}] ${data.old_info}=>${data.new_info}`)
logger.info(`${logger.blue(`[${data.self_id}]`)} 子频道更新:[${data.guild_id}-${data.channel_id}, ${data.user_id}] ${JSON.stringify(data.old_info)}=>${JSON.stringify(data.new_info)}`)
break
case "channel_created":
data.notice_type = "guild_channel_created"
logger.info(`${logger.blue(`[${data.self_id}]`)} 子频道创建:[${data.guild_id}-${data.channel_id}, ${data.user_id}] ${data.channel_info}`)
logger.info(`${logger.blue(`[${data.self_id}]`)} 子频道创建:[${data.guild_id}-${data.channel_id}, ${data.user_id}] ${JSON.stringify(data.channel_info)}`)
Bot[data.self_id].gl = await this.getGroupMap(data)
break
default:

View File

@ -391,7 +391,7 @@ class PluginsLoader {
for (let val of e.message) {
switch (val.type) {
case "text":
e.msg = (e.msg || "") + (val.text || "").replace(/^\s*[#井#]+\s*/, "#").replace(/^\s*[\\*※]+\s*/, "*").trim()
e.msg = (e.msg || "") + (val.text || "").replace(/^\s*[##井]+\s*/, "#").replace(/^\s*[\\*※]+\s*/, "*").trim()
break
case "image":
if (!e.img) {

View File

@ -13,6 +13,8 @@ import MysApi from '../../plugins/genshin/model/mys/mysApi.js'
import MysInfo from '../../plugins/genshin/model/mys/mysInfo.js'
import puppeteer from '../puppeteer/puppeteer.js'
import { Version } from '#miao'
import NoteUser from '../../plugins/genshin/model/mys/NoteUser.js'
import MysUser from '../../plugins/genshin/model/mys/MysUser.js'
/**
* 常用的处理方法
@ -56,6 +58,14 @@ export default class Runtime {
return MysInfo
}
get NoteUser () {
return NoteUser
}
get MysUser () {
return MysUser
}
static async init (e) {
e.runtime = new Runtime(e)
e.user = await MysInfo.getNoteUser(e)

View File

@ -39,7 +39,7 @@
},
"devDependencies": {
"eslint": "^8.41.0",
"eslint-config-standard": "^17.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.1.1"