mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
70b3005005 | ||
![]() |
ac5fe4d275 | ||
![]() |
4aadcd5288 | ||
![]() |
2f74de667e | ||
![]() |
8b89fd7a0b | ||
![]() |
8239e9a243 | ||
![]() |
951afea794 | ||
![]() |
a4beeba528 | ||
![]() |
9b32140f87 | ||
![]() |
e10a67ce05 | ||
![]() |
e07c06f3e9 | ||
![]() |
0d8d3ac24f | ||
![]() |
9d0f9e7096 | ||
![]() |
e988908784 | ||
![]() |
b40c81c5cb | ||
![]() |
457ffc0922 | ||
![]() |
41822eb052 | ||
![]() |
0bc6e23343 | ||
![]() |
9ec09c6eee | ||
![]() |
0876e4645f | ||
![]() |
36d990e328 | ||
![]() |
d5875c9e5b | ||
![]() |
a58fb31f8e | ||
![]() |
f9270c38cf | ||
![]() |
e5ab6134cd | ||
![]() |
24f09d485e | ||
![]() |
f400d43b8a | ||
![]() |
1c6364d98f | ||
![]() |
ac07c98ae1 | ||
![]() |
6c66dab3dc | ||
![]() |
936b1d911c | ||
![]() |
1876dd29ac | ||
![]() |
64c5eb6c04 | ||
![]() |
476d498e44 | ||
![]() |
b03bcf9a7c | ||
![]() |
9284fc7e8a | ||
![]() |
1d63473a04 |
@@ -23,6 +23,10 @@ TG 群:<https://t.me/+nLZEnpne-pQ1OWFl>
|
|||||||
|
|
||||||
[](https://starchart.cc/LLOneBot/LLOneBot)
|
[](https://starchart.cc/LLOneBot/LLOneBot)
|
||||||
|
|
||||||
|
## 贡献者
|
||||||
|
|
||||||
|
[](https://github.com/LOneBot/LLOneBot/graphs/contributors)
|
||||||
|
|
||||||
## 鸣谢
|
## 鸣谢
|
||||||
|
|
||||||
- [NapCatQQ](https://github.com/NapNeko/NapCatQQ)
|
- [NapCatQQ](https://github.com/NapNeko/NapCatQQ)
|
||||||
|
@@ -4,16 +4,12 @@
|
|||||||
"name": "LLOneBot",
|
"name": "LLOneBot",
|
||||||
"slug": "LLOneBot",
|
"slug": "LLOneBot",
|
||||||
"description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发",
|
"description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发",
|
||||||
"version": "4.1.3",
|
"version": "4.1.1",
|
||||||
"icon": "./icon.webp",
|
"icon": "./icon.webp",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "linyuchen",
|
"name": "linyuchen",
|
||||||
"link": "https://github.com/linyuchen"
|
"link": "https://github.com/linyuchen"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "idranme",
|
|
||||||
"link": "https://github.com/idranme"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -34,4 +30,4 @@
|
|||||||
"main": "./main/main.cjs",
|
"main": "./main/main.cjs",
|
||||||
"preload": "./preload/preload.cjs"
|
"preload": "./preload/preload.cjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -28,7 +28,7 @@
|
|||||||
"fluent-ffmpeg": "^2.1.3",
|
"fluent-ffmpeg": "^2.1.3",
|
||||||
"minato": "^3.6.0",
|
"minato": "^3.6.0",
|
||||||
"protobufjs": "^7.4.0",
|
"protobufjs": "^7.4.0",
|
||||||
"silk-wasm": "^3.6.3",
|
"silk-wasm": "^3.6.1",
|
||||||
"ts-case-convert": "^2.1.0",
|
"ts-case-convert": "^2.1.0",
|
||||||
"ws": "^8.18.0"
|
"ws": "^8.18.0"
|
||||||
},
|
},
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"electron-vite": "^2.3.0",
|
"electron-vite": "^2.3.0",
|
||||||
"protobufjs-cli": "^1.1.3",
|
"protobufjs-cli": "^1.1.3",
|
||||||
"typescript": "^5.6.3",
|
"typescript": "^5.6.3",
|
||||||
"vite": "^5.4.10 ",
|
"vite": "^5.4.9",
|
||||||
"vite-plugin-cp": "^4.0.8"
|
"vite-plugin-cp": "^4.0.8"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.5.1"
|
"packageManager": "yarn@4.5.1"
|
||||||
|
@@ -122,11 +122,8 @@ export async function uri2local(ctx: Context, uri: string, needExt?: boolean): P
|
|||||||
const { type } = checkUriType(uri)
|
const { type } = checkUriType(uri)
|
||||||
|
|
||||||
if (type === FileUriType.FileURL) {
|
if (type === FileUriType.FileURL) {
|
||||||
const fileUri = uri.replace('%', '%25').replace('#', '%23')
|
const filePath = fileURLToPath(uri)
|
||||||
const filePath = fileURLToPath(fileUri)
|
|
||||||
const fileName = path.basename(filePath)
|
const fileName = path.basename(filePath)
|
||||||
// console.log('fileURLToPath', filePath)
|
|
||||||
// console.log('fileName', fileName)
|
|
||||||
return { success: true, errMsg: '', fileName, path: filePath, isLocal: true }
|
return { success: true, errMsg: '', fileName, path: filePath, isLocal: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -185,7 +185,7 @@ function onLoad() {
|
|||||||
|
|
||||||
if (config.enableLLOB && (config.satori.enable || config.ob11.enable)) {
|
if (config.enableLLOB && (config.satori.enable || config.ob11.enable)) {
|
||||||
startHook()
|
startHook()
|
||||||
await ctx.sleep(600)
|
await ctx.sleep(550)
|
||||||
} else {
|
} else {
|
||||||
llonebotError.otherError = 'LLOneBot 未启动'
|
llonebotError.otherError = 'LLOneBot 未启动'
|
||||||
log('LLOneBot 开关设置为关闭,不启动 LLOneBot')
|
log('LLOneBot 开关设置为关闭,不启动 LLOneBot')
|
||||||
@@ -225,7 +225,7 @@ function onLoad() {
|
|||||||
started = true
|
started = true
|
||||||
llonebotError.otherError = ''
|
llonebotError.otherError = ''
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 600)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建窗口时触发
|
// 创建窗口时触发
|
||||||
|
@@ -43,7 +43,7 @@ export class NTQQFileApi extends Service {
|
|||||||
msgId,
|
msgId,
|
||||||
elemId: elementId,
|
elemId: elementId,
|
||||||
videoCodecFormat: 0,
|
videoCodecFormat: 0,
|
||||||
exParams: {
|
params: {
|
||||||
downSourceType: 1,
|
downSourceType: 1,
|
||||||
triggerType: 1
|
triggerType: 1
|
||||||
}
|
}
|
||||||
|
@@ -70,12 +70,10 @@ export function startHook() {
|
|||||||
delete hookApiCallbacks[callbackId]
|
delete hookApiCallbacks[callbackId]
|
||||||
}
|
}
|
||||||
} else if (args[2]) {
|
} else if (args[2]) {
|
||||||
if (['IPC_DOWN_2', 'IPC_DOWN_3'].includes(args[0])) {
|
for (const receiveData of args[2]) {
|
||||||
for (const receiveData of args[2]) {
|
for (const hook of receiveHooks.values()) {
|
||||||
for (const hook of receiveHooks.values()) {
|
if (hook.method.includes(receiveData.cmdName)) {
|
||||||
if (hook.method.includes(receiveData.cmdName)) {
|
Promise.resolve(hook.hookFunc(receiveData.payload))
|
||||||
Promise.resolve(hook.hookFunc(receiveData.payload))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,8 @@ interface FileResponse {
|
|||||||
export class DownloadFile extends BaseAction<Payload, FileResponse> {
|
export class DownloadFile extends BaseAction<Payload, FileResponse> {
|
||||||
actionName = ActionName.GoCQHTTP_DownloadFile
|
actionName = ActionName.GoCQHTTP_DownloadFile
|
||||||
payloadSchema = Schema.object({
|
payloadSchema = Schema.object({
|
||||||
url: Schema.string(),
|
url: String,
|
||||||
base64: Schema.string(),
|
base64: String,
|
||||||
headers: Schema.union([String, Schema.array(String)])
|
headers: Schema.union([String, Schema.array(String)])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -478,13 +478,6 @@ export namespace OB11Entities {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (groupElement.type === TipGroupElementType.MemberIncrease) {
|
|
||||||
const { memberUid, adminUid } = groupElement
|
|
||||||
if (memberUid !== selfInfo.uid) return
|
|
||||||
ctx.logger.info('收到群成员增加消息', groupElement)
|
|
||||||
const adminUin = adminUid ? await ctx.ntUserApi.getUinByUid(adminUid) : selfInfo.uin
|
|
||||||
return new OB11GroupIncreaseEvent(+msg.peerUid, +selfInfo.uin, +adminUin)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (element.fileElement) {
|
else if (element.fileElement) {
|
||||||
return new OB11GroupUploadNoticeEvent(+msg.peerUid, +msg.senderUin!, {
|
return new OB11GroupUploadNoticeEvent(+msg.peerUid, +msg.senderUin!, {
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const version = '4.1.3'
|
export const version = '4.1.1'
|
||||||
|
Reference in New Issue
Block a user