mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
Merge branch 'dev'
This commit is contained in:
commit
62e23614fb
@ -4,7 +4,7 @@
|
||||
"name": "LLOneBot",
|
||||
"slug": "LLOneBot",
|
||||
"description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发",
|
||||
"version": "4.3.1",
|
||||
"version": "4.3.2",
|
||||
"icon": "./icon.webp",
|
||||
"authors": [
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { WrapperSession } from './wrapper-session/types';
|
||||
export { initWrapperSession } from './wrapper-session';
|
||||
export declare function checkSupportVersion(): void;
|
||||
export declare class NTQQPacketApi {
|
||||
private qqVersion;
|
||||
private packetSession;
|
||||
private readonly packetClient;
|
||||
private readonly packer;
|
||||
private logger;
|
||||
private readonly wrapperSession;
|
||||
constructor(wrapperSession: WrapperSession);
|
||||
get available(): boolean;
|
||||
private checkQQVersion;
|
||||
private InitSendPacket;
|
||||
private sendPacket;
|
||||
private sendOidbPacket;
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
||||
import { BaseAction, Schema } from '../BaseAction'
|
||||
import { ActionName } from '../types'
|
||||
import { getBuildVersion } from '@/common/utils'
|
||||
|
||||
interface Payload {
|
||||
user_id: number | string
|
||||
@ -12,15 +13,12 @@ export class FriendPoke extends BaseAction<Payload, null> {
|
||||
})
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
// if (!this.ctx.app.native.checkPlatform()) {
|
||||
// throw new Error('当前系统平台或架构不支持')
|
||||
// }
|
||||
// if (!this.ctx.app.native.checkVersion()) {
|
||||
// throw new Error(`当前 QQ 版本 ${getBuildVersion()} 不支持,可尝试其他版本 27333—27597`)
|
||||
// }
|
||||
// await this.ctx.app.native.sendFriendPoke(+payload.user_id)
|
||||
|
||||
await this.ctx.app.packet.sendPokePacket(+payload.user_id)
|
||||
if (!this.ctx.app.native.checkPlatform() || !this.ctx.app.native.checkVersion()) {
|
||||
await this.ctx.app.packet.sendPokePacket(+payload.user_id)
|
||||
}
|
||||
else{
|
||||
await this.ctx.app.native.sendFriendPoke(+payload.user_id)
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { BaseAction, Schema } from '../BaseAction'
|
||||
import { ActionName } from '../types'
|
||||
import { getBuildVersion } from '@/common/utils'
|
||||
|
||||
interface Payload {
|
||||
group_id: number | string
|
||||
@ -14,14 +15,12 @@ export class GroupPoke extends BaseAction<Payload, null> {
|
||||
})
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
// if (!this.ctx.app.native.checkPlatform()) {
|
||||
// throw new Error('当前系统平台或架构不支持')
|
||||
// }
|
||||
// if (!this.ctx.app.native.checkVersion()) {
|
||||
// throw new Error(`当前 QQ 版本 ${getBuildVersion()} 不支持,可尝试其他版本 27333—27597`)
|
||||
// }
|
||||
// await this.ctx.app.native.sendGroupPoke(+payload.group_id, +payload.user_id)
|
||||
await this.ctx.app.packet.sendPokePacket(+payload.user_id, +payload.group_id)
|
||||
if (!this.ctx.app.native.checkPlatform() || !this.ctx.app.native.checkVersion()) {
|
||||
await this.ctx.app.packet.sendPokePacket(+payload.user_id, +payload.group_id)
|
||||
}
|
||||
else{
|
||||
await this.ctx.app.native.sendGroupPoke(+payload.group_id, +payload.user_id)
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = '4.3.1'
|
||||
export const version = '4.3.2'
|
||||
|
Loading…
x
Reference in New Issue
Block a user