2023-10-23 19:01:56 +00:00
|
|
|
import { createApps } from 'alemonjs'
|
|
|
|
import { apps } from './index.js'
|
|
|
|
const app = createApps(import.meta.url)
|
2023-11-27 19:54:45 +00:00
|
|
|
const arg = /^#?(\*|星铁|星轨|穹轨|星穹|崩铁|星穹铁道|崩坏星穹铁道|铁道)+/
|
2023-10-23 19:01:56 +00:00
|
|
|
app.setMessage(async e => {
|
2023-11-27 19:54:45 +00:00
|
|
|
e.isSr = true
|
|
|
|
e.isGs = true
|
2023-10-24 08:49:31 +00:00
|
|
|
await runtime.init(e)
|
2023-11-27 19:54:45 +00:00
|
|
|
Object.defineProperty(e, 'isSr', {
|
|
|
|
get: () => e.game === 'sr',
|
|
|
|
set: (v) => { e.game = v ? 'sr' : 'gs' }
|
|
|
|
})
|
|
|
|
Object.defineProperty(e, 'isGs', {
|
|
|
|
get: () => e.game === 'gs',
|
|
|
|
set: (v) => { e.game = v ? 'gs' : 'sr' }
|
|
|
|
})
|
|
|
|
if (arg.test(e.msg)) {
|
|
|
|
e.game = 'sr'
|
|
|
|
e.msg = e.msg.replace(arg, '#星铁')
|
|
|
|
}
|
2023-10-23 19:01:56 +00:00
|
|
|
e.sender = {}
|
|
|
|
e.sender.card = e.user_name
|
|
|
|
return e
|
|
|
|
})
|
2023-10-30 07:52:22 +00:00
|
|
|
app.setCharacter('#')
|
2023-10-23 19:01:56 +00:00
|
|
|
app.component(apps)
|
2023-11-27 19:54:45 +00:00
|
|
|
app.mount()
|