Merge remote-tracking branch 'origin/master' into profile-v2

# Conflicts:
#	index.js
This commit is contained in:
Kokomi 2023-10-25 03:53:08 +08:00
commit 658d2ade2c
3 changed files with 22 additions and 11 deletions

View File

@ -78,19 +78,27 @@ const { changelogs, currentVersion } = readLogFile('miao')
const yunzaiVersion = packageJson.version const yunzaiVersion = packageJson.version
const isV3 = yunzaiVersion[0] === '3' const isV3 = yunzaiVersion[0] === '3'
let isMiao = false let isMiao = false
let name = "Yunzai-Bot" let name = 'Yunzai-Bot'
let isAlemonjs = false
if (packageJson.name === 'miao-yunzai') { if (packageJson.name === 'miao-yunzai') {
isMiao = true isMiao = true
name = "Miao-Yunzai" name = 'Miao-Yunzai'
} else if (packageJson.name === 'trss-yunzai') { } else if (packageJson.name === 'trss-yunzai') {
isMiao = true isMiao = true
name = "TRSS-Yunzai" name = 'TRSS-Yunzai'
} }
else if (packageJson.name === 'a-yunzai') {
isMiao = true
name = 'A-Yunzai'
isAlemonjs = true
}
let Version = { let Version = {
isV3, isV3,
isMiao, isMiao,
name, name,
isAlemonjs,
get version () { get version () {
return currentVersion return currentVersion
}, },

View File

@ -1,8 +0,0 @@
import { createApp, getAppName } from 'alemonjs'
const AppName = getAppName(import.meta.url)
const { apps } = await import('./apps/index.js').finally(() => {
console.log('[APP] 喵喵插件 启动')
})
const app = createApp(AppName)
app.component(apps)
app.mount()

11
main.js Normal file
View File

@ -0,0 +1,11 @@
import { createApps } from 'alemonjs'
import { apps } from './index.js'
const app = createApps(import.meta.url)
app.setMessage(async e => {
await runtime.init(e)
e.sender = {}
e.sender.card = e.user_name
return e
})
app.component(apps)
app.mount()