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

Method initializeSelf

trace/trace.ts:166–177  ·  view source on GitHub ↗

* [MODIFIED] Renamed and enhanced to get our own user ID and premium status.

()

Source from the content-addressed store, hash-verified

164 },
165 };
166 };
167 }
168
169 private async initializeDB() {
170 const dbPath = path.join(createDirectoryInAssets("trace"), "db.json");
171 this.db = await JSONFilePreset<TraceDB>(dbPath, defaultState);
172 }
173
174 private scheduleDelete(msg: Api.Message, seconds: number): void {
175 let timer: ReturnType<typeof setTimeout>;
176 timer = setTimeout(() => {
177 this.pendingDeleteTimers.delete(timer);
178 msg.delete().catch(() => {});
179 }, seconds * 1000);
180 if (typeof (timer as any).unref === "function") {

Callers 2

handleMessageMethod · 0.95
parseReactionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected