mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
commit
9ec09c6eee
@ -4,7 +4,7 @@
|
|||||||
"name": "LLOneBot",
|
"name": "LLOneBot",
|
||||||
"slug": "LLOneBot",
|
"slug": "LLOneBot",
|
||||||
"description": "实现 OneBot 11 协议,用于 QQ 机器人开发",
|
"description": "实现 OneBot 11 协议,用于 QQ 机器人开发",
|
||||||
"version": "3.34.0",
|
"version": "3.34.1",
|
||||||
"icon": "./icon.webp",
|
"icon": "./icon.webp",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,9 @@ import path from 'node:path'
|
|||||||
import Log from './log'
|
import Log from './log'
|
||||||
import Core from '../ntqqapi/core'
|
import Core from '../ntqqapi/core'
|
||||||
import OneBot11Adapter from '../onebot11/adapter'
|
import OneBot11Adapter from '../onebot11/adapter'
|
||||||
|
import Database from 'minato'
|
||||||
|
import SQLiteDriver from '@minatojs/driver-sqlite'
|
||||||
|
import Store from './store'
|
||||||
import { BrowserWindow, dialog, ipcMain } from 'electron'
|
import { BrowserWindow, dialog, ipcMain } from 'electron'
|
||||||
import { Config as LLOBConfig } from '../common/types'
|
import { Config as LLOBConfig } from '../common/types'
|
||||||
import {
|
import {
|
||||||
@ -35,9 +38,6 @@ import {
|
|||||||
} from '../ntqqapi/api'
|
} from '../ntqqapi/api'
|
||||||
import { mkdir } from 'node:fs/promises'
|
import { mkdir } from 'node:fs/promises'
|
||||||
import { existsSync, mkdirSync } from 'node:fs'
|
import { existsSync, mkdirSync } from 'node:fs'
|
||||||
import Database from 'minato'
|
|
||||||
import SQLiteDriver from '@minatojs/driver-sqlite'
|
|
||||||
import Store from './store'
|
|
||||||
|
|
||||||
declare module 'cordis' {
|
declare module 'cordis' {
|
||||||
interface Events {
|
interface Events {
|
||||||
@ -176,17 +176,6 @@ function onLoad() {
|
|||||||
ctx.plugin(NTQQWebApi)
|
ctx.plugin(NTQQWebApi)
|
||||||
ctx.plugin(NTQQWindowApi)
|
ctx.plugin(NTQQWindowApi)
|
||||||
ctx.plugin(Core, config)
|
ctx.plugin(Core, config)
|
||||||
ctx.plugin(OneBot11Adapter, {
|
|
||||||
...config.ob11,
|
|
||||||
heartInterval: config.heartInterval,
|
|
||||||
token: config.token!,
|
|
||||||
debug: config.debug!,
|
|
||||||
reportSelfMessage: config.reportSelfMessage!,
|
|
||||||
msgCacheExpire: config.msgCacheExpire!,
|
|
||||||
musicSignUrl: config.musicSignUrl,
|
|
||||||
enableLocalFile2Url: config.enableLocalFile2Url!,
|
|
||||||
ffmpeg: config.ffmpeg,
|
|
||||||
})
|
|
||||||
ctx.plugin(Database)
|
ctx.plugin(Database)
|
||||||
ctx.plugin(SQLiteDriver, {
|
ctx.plugin(SQLiteDriver, {
|
||||||
path: path.join(dbDir, `${selfInfo.uin}.db`)
|
path: path.join(dbDir, `${selfInfo.uin}.db`)
|
||||||
@ -194,7 +183,18 @@ function onLoad() {
|
|||||||
ctx.plugin(Store, {
|
ctx.plugin(Store, {
|
||||||
msgCacheExpire: config.msgCacheExpire! * 1000
|
msgCacheExpire: config.msgCacheExpire! * 1000
|
||||||
})
|
})
|
||||||
|
ctx.plugin(OneBot11Adapter, {
|
||||||
|
...config.ob11,
|
||||||
|
heartInterval: config.heartInterval,
|
||||||
|
token: config.token!,
|
||||||
|
debug: config.debug!,
|
||||||
|
reportSelfMessage: config.reportSelfMessage!,
|
||||||
|
musicSignUrl: config.musicSignUrl,
|
||||||
|
enableLocalFile2Url: config.enableLocalFile2Url!,
|
||||||
|
ffmpeg: config.ffmpeg,
|
||||||
|
})
|
||||||
ctx.start()
|
ctx.start()
|
||||||
|
llonebotError.otherError = ''
|
||||||
ipcMain.on(CHANNEL_SET_CONFIG_CONFIRMED, (event, config: LLOBConfig) => {
|
ipcMain.on(CHANNEL_SET_CONFIG_CONFIRMED, (event, config: LLOBConfig) => {
|
||||||
ctx.parallel('llonebot/config-updated', config)
|
ctx.parallel('llonebot/config-updated', config)
|
||||||
})
|
})
|
||||||
|
@ -1 +1 @@
|
|||||||
export const version = '3.34.0'
|
export const version = '3.34.1'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user