MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / parseIndices

Function parseIndices

shift/shift.ts:501–522  ·  view source on GitHub ↗
(
  indicesStr: string,
  total: number
)

Source from the content-addressed store, hash-verified

499 indices.push(idx);
500 } else {
501 invalid.push(i.trim());
502 }
503 } catch (error) {
504 invalid.push(i.trim());
505 }
506 }
507
508 return { indices, invalid };
509}
510
511function getMediaType(message: any): string {
512 if (message.photo) return "photo";
513 if (message.document) return "document";
514 if (message.video) return "video";
515 if (message.sticker) return "sticker";
516 if (message.animation) return "animation";
517 if (message.voice) return "voice";
518 if (message.audio) return "audio";
519 return "text";
520}
521
522type TimerHandle = ReturnType<typeof setTimeout>;
523
524function isAbortError(error: unknown): boolean {
525 return error instanceof Error && error.name === "AbortError";

Callers 1

ShiftPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected