refactor: trim discord internal helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 16:12:31 +01:00
parent 7e06455e64
commit bce729f6ab
6 changed files with 9 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ export const discordMessagingActionRuntime = {
unpinMessageDiscord,
};
export async function resolveDiscordReactionTargetChannelId(params: {
async function resolveDiscordReactionTargetChannelId(params: {
target: string;
cfg: OpenClawConfig;
accountId?: string;

View File

@@ -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> {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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";

View File

@@ -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;