amesu
Version:
Node.js SDK for QQ Bot.
35 lines (34 loc) • 975 B
TypeScript
import type { Request, Result } from '../utils';
export interface Gateway {
/** 用于连接 `websocket` 的地址。 */
url: string;
}
interface SessionStartLimit {
/** 每 24 小时可创建 Session 数。 */
total: number;
/** 目前还可以创建的 Session 数。 */
remaining: number;
/** 重置计数的剩余时间(ms)。 */
reset_after: number;
/** 每 5s 可以创建的 Session 数。 */
max_concurrency: number;
}
export interface GatewayBot {
/** WebSocket 的连接地址。 */
url: string;
/** 建议的 shard 数。 */
shards: number;
/** 创建 Session 限制信息。 */
session_start_limit: SessionStartLimit;
}
declare const _default: (request: Request) => {
/**
* 获取通用 WSS 接入点。
*/
getGateway(): Promise<Result<Gateway>>;
/**
* 获取带分片 WSS 接入点。
*/
getGatewayBot(): Promise<Result<GatewayBot>>;
};
export default _default;