mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:30:42 +00:00
refactor: trim discord internal helper exports
This commit is contained in:
@@ -51,7 +51,7 @@ export const discordMessagingActionRuntime = {
|
||||
unpinMessageDiscord,
|
||||
};
|
||||
|
||||
export async function resolveDiscordReactionTargetChannelId(params: {
|
||||
async function resolveDiscordReactionTargetChannelId(params: {
|
||||
target: string;
|
||||
cfg: OpenClawConfig;
|
||||
accountId?: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const IDENTIFY_WINDOW_MS = 5_000;
|
||||
|
||||
export class GatewayIdentifyLimiter {
|
||||
class GatewayIdentifyLimiter {
|
||||
private nextAllowedAtByKey = new Map<number, number>();
|
||||
|
||||
async wait(params: { shardId?: number; maxConcurrency?: number }): Promise<void> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const GATEWAY_SEND_LIMIT = 120;
|
||||
export const GATEWAY_SEND_WINDOW_MS = 60_000;
|
||||
const GATEWAY_SEND_LIMIT = 120;
|
||||
const GATEWAY_SEND_WINDOW_MS = 60_000;
|
||||
|
||||
type QueuedGatewaySend = {
|
||||
payload: string;
|
||||
|
||||
@@ -27,8 +27,8 @@ export type Activity = NonNullable<GatewayPresenceUpdateData["activities"]>[numb
|
||||
export type UpdatePresenceData = Omit<GatewayPresenceUpdateData, "status"> & {
|
||||
status: "online" | "idle" | "dnd" | "invisible" | "offline";
|
||||
};
|
||||
export type UpdateVoiceStateData = GatewayVoiceStateUpdateData;
|
||||
export type RequestGuildMembersData = {
|
||||
type UpdateVoiceStateData = GatewayVoiceStateUpdateData;
|
||||
type RequestGuildMembersData = {
|
||||
guild_id: string;
|
||||
query?: string;
|
||||
limit: number;
|
||||
|
||||
@@ -6,7 +6,7 @@ export type InteractionResponseState =
|
||||
| "deferred-update"
|
||||
| "replied";
|
||||
|
||||
export type InteractionReplyAction = "initial" | "edit" | "follow-up";
|
||||
type InteractionReplyAction = "initial" | "edit" | "follow-up";
|
||||
|
||||
export class InteractionResponseController {
|
||||
state: InteractionResponseState = "unacknowledged";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { RateLimitError, readRetryAfter } from "./rest-errors.js";
|
||||
import { createBucketKey, createRouteKey, readHeaderNumber, readResetAt } from "./rest-routes.js";
|
||||
|
||||
export type RequestQuery = Record<string, string | number | boolean>;
|
||||
export type ScheduledRequest<TData> = {
|
||||
type ScheduledRequest<TData> = {
|
||||
method: string;
|
||||
path: string;
|
||||
data?: TData;
|
||||
@@ -26,7 +26,7 @@ type BucketState<TData> = {
|
||||
routeKeys: Set<string>;
|
||||
};
|
||||
|
||||
export type RestSchedulerOptions = {
|
||||
type RestSchedulerOptions = {
|
||||
maxConcurrency: number;
|
||||
maxRateLimitRetries: number;
|
||||
maxQueueSize: number;
|
||||
|
||||
Reference in New Issue
Block a user