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

Function toIdString

deepwiki/deepwiki.ts:611–626  ·  view source on GitHub ↗
(v: any)

Source from the content-addressed store, hash-verified

609};
610
611const toIdString = (v: any): string => {
612 try {
613 if (v === null || v === undefined) return "";
614 if (typeof v === "string") return v;
615 if (typeof v === "number" || typeof v === "bigint") return String(v);
616 if (typeof v === "object") {
617 if (v.channelId !== undefined) return String(v.channelId);
618 if (v.chatId !== undefined) return String(v.chatId);
619 if (v.userId !== undefined) return String(v.userId);
620 if (v.id !== undefined) return String(v.id);
621 }
622 return String(v);
623 } catch {
624 return "";
625 }
626};
627
628class DeepWikiPlugin extends Plugin {
629 name = "deepwiki";

Callers 1

getChatKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected