mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix:timestamp
This commit is contained in:
parent
8f80da8c5b
commit
66c823e3bd
@ -4,7 +4,7 @@
|
|||||||
"name": "LLOneBot",
|
"name": "LLOneBot",
|
||||||
"slug": "LLOneBot",
|
"slug": "LLOneBot",
|
||||||
"description": "LiteLoaderQQNT的OneBotApi",
|
"description": "LiteLoaderQQNT的OneBotApi",
|
||||||
"version": "3.10.0",
|
"version": "3.10.1",
|
||||||
"thumbnail": "./icon.png",
|
"thumbnail": "./icon.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import {LLOneBotError} from "./types";
|
|||||||
export let groups: Group[] = []
|
export let groups: Group[] = []
|
||||||
export let friends: Friend[] = []
|
export let friends: Friend[] = []
|
||||||
export let msgHistory: Record<string, RawMessage> = {} // msgId: RawMessage
|
export let msgHistory: Record<string, RawMessage> = {} // msgId: RawMessage
|
||||||
export const version = "3.10.0"
|
export const version = "3.10.1"
|
||||||
export let groupNotifies: Map<string, GroupNotify> = new Map<string, GroupNotify>();
|
export let groupNotifies: Map<string, GroupNotify> = new Map<string, GroupNotify>();
|
||||||
export let friendRequests: Map<number, FriendRequest> = new Map<number, FriendRequest>();
|
export let friendRequests: Map<number, FriendRequest> = new Map<number, FriendRequest>();
|
||||||
export let llonebotError: LLOneBotError = {
|
export let llonebotError: LLOneBotError = {
|
||||||
|
@ -23,7 +23,7 @@ export class OB11Constructor {
|
|||||||
const resMsg: OB11Message = {
|
const resMsg: OB11Message = {
|
||||||
self_id: parseInt(selfInfo.uin),
|
self_id: parseInt(selfInfo.uin),
|
||||||
user_id: parseInt(msg.senderUin),
|
user_id: parseInt(msg.senderUin),
|
||||||
time: parseInt(msg.msgTime) * 1000 || Date.now(), // 13位时间戳,毫秒
|
time: parseInt(msg.msgTime) || Date.now(),
|
||||||
message_id: msg.msgShortId,
|
message_id: msg.msgShortId,
|
||||||
real_id: msg.msgId,
|
real_id: msg.msgId,
|
||||||
message_type: msg.chatType == ChatType.group ? "group" : "private",
|
message_type: msg.chatType == ChatType.group ? "group" : "private",
|
||||||
|
@ -10,7 +10,7 @@ export enum EventType {
|
|||||||
|
|
||||||
|
|
||||||
export abstract class OB11BaseEvent {
|
export abstract class OB11BaseEvent {
|
||||||
time = Date.now();
|
time = Math.floor(Date.now() / 1000);;
|
||||||
self_id = parseInt(selfInfo.uin);
|
self_id = parseInt(selfInfo.uin);
|
||||||
post_type: EventType;
|
post_type: EventType;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user