refactor: trim discord internal helper exports · openclaw/openclaw@bce729f
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -51,7 +51,7 @@ export const discordMessagingActionRuntime = {
|
51 | 51 | unpinMessageDiscord, |
52 | 52 | }; |
53 | 53 | |
54 | | -export async function resolveDiscordReactionTargetChannelId(params: { |
| 54 | +async function resolveDiscordReactionTargetChannelId(params: { |
55 | 55 | target: string; |
56 | 56 | cfg: OpenClawConfig; |
57 | 57 | accountId?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | const IDENTIFY_WINDOW_MS = 5_000; |
2 | 2 | |
3 | | -export class GatewayIdentifyLimiter { |
| 3 | +class GatewayIdentifyLimiter { |
4 | 4 | private nextAllowedAtByKey = new Map<number, number>(); |
5 | 5 | |
6 | 6 | async wait(params: { shardId?: number; maxConcurrency?: number }): Promise<void> { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export const GATEWAY_SEND_LIMIT = 120; |
2 | | -export const GATEWAY_SEND_WINDOW_MS = 60_000; |
| 1 | +const GATEWAY_SEND_LIMIT = 120; |
| 2 | +const GATEWAY_SEND_WINDOW_MS = 60_000; |
3 | 3 | |
4 | 4 | type QueuedGatewaySend = { |
5 | 5 | payload: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,8 +27,8 @@ export type Activity = NonNullable<GatewayPresenceUpdateData["activities"]>[numb
|
27 | 27 | export type UpdatePresenceData = Omit<GatewayPresenceUpdateData, "status"> & { |
28 | 28 | status: "online" | "idle" | "dnd" | "invisible" | "offline"; |
29 | 29 | }; |
30 | | -export type UpdateVoiceStateData = GatewayVoiceStateUpdateData; |
31 | | -export type RequestGuildMembersData = { |
| 30 | +type UpdateVoiceStateData = GatewayVoiceStateUpdateData; |
| 31 | +type RequestGuildMembersData = { |
32 | 32 | guild_id: string; |
33 | 33 | query?: string; |
34 | 34 | limit: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ export type InteractionResponseState =
|
6 | 6 | | "deferred-update" |
7 | 7 | | "replied"; |
8 | 8 | |
9 | | -export type InteractionReplyAction = "initial" | "edit" | "follow-up"; |
| 9 | +type InteractionReplyAction = "initial" | "edit" | "follow-up"; |
10 | 10 | |
11 | 11 | export class InteractionResponseController { |
12 | 12 | state: InteractionResponseState = "unacknowledged"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import { RateLimitError, readRetryAfter } from "./rest-errors.js";
|
2 | 2 | import { createBucketKey, createRouteKey, readHeaderNumber, readResetAt } from "./rest-routes.js"; |
3 | 3 | |
4 | 4 | export type RequestQuery = Record<string, string | number | boolean>; |
5 | | -export type ScheduledRequest<TData> = { |
| 5 | +type ScheduledRequest<TData> = { |
6 | 6 | method: string; |
7 | 7 | path: string; |
8 | 8 | data?: TData; |
@@ -26,7 +26,7 @@ type BucketState<TData> = {
|
26 | 26 | routeKeys: Set<string>; |
27 | 27 | }; |
28 | 28 | |
29 | | -export type RestSchedulerOptions = { |
| 29 | +type RestSchedulerOptions = { |
30 | 30 | maxConcurrency: number; |
31 | 31 | maxRateLimitRetries: number; |
32 | 32 | maxQueueSize: number; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。