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

Method initDB

save/save.ts:425–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

423
424 private parseMessageLink(link: string): { chatId: string; messageId: number } | null {
425 const cleanLink = link.split('?')[0];
426
427 const patterns = [
428 /(?:https?:\/\/)?t\.me\/c\/(-?\d+)\/(\d+)/,
429 /(?:https?:\/\/)?t\.me\/([a-zA-Z0-9_]+)\/(\d+)/,
430 ];
431
432 for (const pattern of patterns) {
433 const match = cleanLink.match(pattern);
434 if (match) {
435 let chatId = match[1];

Callers 4

setupMethod · 0.95
getUserConfigMethod · 0.95
setUserConfigMethod · 0.95
PrometheusPluginClass · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected