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

Function getChatId

keyword/keyword.ts:546–561  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

544 return Number(msg.peerId.toString());
545 } else if (msg.chatId) {
546 return Number(msg.chatId.toString());
547 } else {
548 return 0;
549 }
550 } catch (error) {
551 console.error("Get chat ID error:", error);
552 return 0;
553 }
554}
555
556const keywordAlias = new KeywordAlias();
557const keywordTasks = new KeywordTasks();
558
559function parseTaskIds(idsStr: string): number[] {
560 const idList = idsStr.split(",");
561 const result: number[] = [];
562
563 for (const id of idList) {
564 const num = parseInt(id.trim());

Callers 2

checkAndReplyMethod · 0.85
keywordFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected