



























@@ -166,22 +166,22 @@ function wrapDeployRestMethod(params: {
166166 : Buffer.byteLength(typeof body === "string" ? body : JSON.stringify(body), "utf8");
167167if (params.shouldLogVerbose()) {
168168params.runtime.log?.(
169-`discord startup [${params.accountId}] deploy-rest:${params.method}:start ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path}${typeof commandCount === "number" ? ` commands=${commandCount}` : ""}${typeof bodyBytes === "number" ? ` bytes=${bodyBytes}` : ""}`,
169+`discord startup [${params.accountId}] native-slash-command-deploy-rest:${params.method}:start ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path}${typeof commandCount === "number" ? ` commands=${commandCount}` : ""}${typeof bodyBytes === "number" ? ` bytes=${bodyBytes}` : ""}`,
170170);
171171}
172172try {
173173const result = await params.original[params.method](path, data, query);
174174if (params.shouldLogVerbose()) {
175175params.runtime.log?.(
176-`discord startup [${params.accountId}] deploy-rest:${params.method}:done ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path} requestMs=${Date.now() - startedAt}`,
176+`discord startup [${params.accountId}] native-slash-command-deploy-rest:${params.method}:done ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path} requestMs=${Date.now() - startedAt}`,
177177);
178178}
179179return result;
180180} catch (err) {
181181attachDiscordDeployRequestBody(err, body);
182182const details = formatDiscordDeployErrorDetails(err);
183183params.runtime.error?.(
184-`discord startup [${params.accountId}] deploy-rest:${params.method}:error ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path} requestMs=${Date.now() - startedAt} error=${formatErrorMessage(err)}${details}`,
184+`discord startup [${params.accountId}] native-slash-command-deploy-rest:${params.method}:error ${Math.max(0, Date.now() - params.startupStartedAt)}ms path=${path} requestMs=${Date.now() - startedAt} error=${formatErrorMessage(err)}${details}`,
185185);
186186throw err;
187187}
@@ -257,7 +257,7 @@ export async function deployDiscordCommands(params: {
257257if (isDailyCreateLimit(err)) {
258258params.runtime.log?.(
259259warn(
260-`discord: native command deploy skipped for ${accountId}; daily application command create limit reached. Existing slash commands stay active until Discord resets the quota.`,
260+`discord: native slash command deploy skipped for ${accountId}; daily application command create limit reached. Existing slash commands stay active until Discord resets the quota. Message send/receive is unaffected.`,
261261),
262262);
263263return;
@@ -269,7 +269,7 @@ export async function deployDiscordCommands(params: {
269269if (retryAfterMs > maxRetryDelayMs) {
270270params.runtime.log?.(
271271warn(
272-`discord: native command deploy skipped for ${accountId}; retry_after=${retryAfterMs}ms exceeds startup budget. Existing slash commands stay active.`,
272+`discord: native slash command deploy skipped for ${accountId}; retry_after=${retryAfterMs}ms exceeds startup budget. Existing slash commands stay active. Message send/receive is unaffected.`,
273273),
274274);
275275return;
@@ -285,7 +285,9 @@ export async function deployDiscordCommands(params: {
285285} catch (err) {
286286const details = formatDiscordDeployErrorDetails(err);
287287params.runtime.log?.(
288-warn(`discord: native command deploy warning: ${formatErrorMessage(err)}${details}`),
288+warn(
289+`discord: native slash command deploy warning (not message send): ${formatErrorMessage(err)}${details}`,
290+),
289291);
290292} finally {
291293restoreDeployRestLogging();
@@ -325,7 +327,9 @@ export function runDiscordCommandDeployInBackground(params: {
325327})
326328.catch((err: unknown) => {
327329params.runtime.log?.(
328-warn(`discord: native command deploy background warning: ${formatErrorMessage(err)}`),
330+warn(
331+`discord: native slash command deploy background warning (not message send): ${formatErrorMessage(err)}`,
332+),
329333);
330334});
331335}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。