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

Function parseUserIdentifiers

admin_board/admin_board.ts:1087–1107  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

1085 for (const part of parts) {
1086 const key = /^-?\d+$/.test(part)
1087 ? String(Number(part))
1088 : part.replace(/^@/, "").toLowerCase();
1089 if (!deduped.has(key)) {
1090 deduped.set(key, part);
1091 }
1092 }
1093
1094 return Array.from(deduped.values());
1095}
1096
1097function parseSeatActionArgs(remainder: string): {
1098 identifiers: string[];
1099 targetArg?: string;
1100} {
1101 const tokens = remainder.trim().split(/\s+/).filter(Boolean);
1102 const identifiers = parseUserIdentifiers(remainder);
1103 if (identifiers) {
1104 return { identifiers };
1105 }
1106
1107 if (tokens.length > 1) {
1108 const targetArg = tokens[tokens.length - 1];
1109 const targetlessIdentifiers = parseUserIdentifiers(
1110 tokens.slice(0, -1).join(" "),

Callers 1

parseSeatActionArgsFunction · 0.85

Calls 2

setMethod · 0.45

Tested by

no test coverage detected