Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/extensions/discord/src/monitor/   (Openclaw AI Version 22©)  Datei vom 26.3.2026 mit Größe 734 B image not shown  

Quelle  typing.ts

  Sprache: JAVA
 

import type { RequestClient } from "@buape/carbon";
import { Routes } from "discord-api-types/v10";

const DISCORD_TYPING_START_TIMEOUT_MS = 5_000;

export async function sendTyping(params: { rest: RequestClient; channelId: string }) {
  let timer: NodeJS.Timeout | undefined;
  const timeoutPromise = new Promise<never>((_, reject) => {
    timer = setTimeout(() => {
      reject(
        new Error(`discord typing start timed out after ${DISCORD_TYPING_START_TIMEOUT_MS}ms`),
      );
    }, DISCORD_TYPING_START_TIMEOUT_MS);
    timer.unref?.();
  });
  try {
    await Promise.race([params.rest.post(Routes.channelTyping(params.channelId)), timeoutPromise]);
  } finally {
    if (timer) {
      clearTimeout(timer);
    }
  }
}

Messung V0.5 in Prozent
C=98 H=99 G=98

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.