From 3a6a024d59b78cf13fe077a3de19af16c085a644 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Fri, 17 Apr 2026 12:01:43 +0000 Subject: [PATCH] Remove unused strings.ts --- apps/simplex-support-bot/src/strings.ts | 64 ------------------------- 1 file changed, 64 deletions(-) delete mode 100644 apps/simplex-support-bot/src/strings.ts diff --git a/apps/simplex-support-bot/src/strings.ts b/apps/simplex-support-bot/src/strings.ts deleted file mode 100644 index ed07a45895..0000000000 --- a/apps/simplex-support-bot/src/strings.ts +++ /dev/null @@ -1,64 +0,0 @@ -import {readFileSync} from "fs" -import {join} from "path" - -export interface StringsFile { - messages: { - welcome: string[] - queue: string - queueGrokSuffix: string - grokActivated: string[] - teamAdded: string - teamAddedGrokSuffix: string - teamAlreadyInvited: string - teamLocked: string - noTeamMembersWithGrok: string - noTeamMembersWithoutGrok: string - grokInviting: string - grokUnavailable: string - grokError: string - grokNoHistory: string - directReply: string - teamDm: string - joinErrorNotBusinessChat: string - joinErrorFailed: string - } - card: { - stateQueue: string - stateGrok: string - stateTeamPending: string - stateTeam: string - contentImage: string - contentVideo: string - contentVoice: string - contentFile: string - truncated: string - waitDone: string - waitLessThan1m: string - msgsSuffix: string - } - profiles: { - botName: string - grokName: string - } - commands: { - grokLabel: string - teamLabel: string - joinLabel: string - joinParams: string - } -} - -export const S: StringsFile = JSON.parse(readFileSync(join(__dirname, '..', 'strings.json'), 'utf-8')) - -export function lines(arr: string[]): string { - return arr.join("\n") -} - -export function sub(template: string, params: Record): string { - return template.replace(/\{(\w+)\}/g, (_, key) => params[key] ?? `{${key}}`) -} - -export function matchTemplate(template: string, text: string): boolean { - const parts = template.split(/\{\w+\}/).filter(Boolean) - return parts.every(part => text.includes(part)) -}