diff --git a/modules/automod/language.ts b/modules/automod/language.ts index 4015b754a..43e7cd37e 100644 --- a/modules/automod/language.ts +++ b/modules/automod/language.ts @@ -32,7 +32,7 @@ function decodeRegexps(regexps: RegExp[]) { "p": "⒫⍴ppⓟℙₚᴘρϱⲣрየꮲᑭꓑ𝐏", "q": "⒬۹9oqqⓠℚϙϱԛфգզⵕᑫ𝐐", "r": "⒭rrⓡℝℛℜʀɾꭇꭈᴦⲅгհዪꭱꮁꮢꮧᖇꓣ乃几卂尺𝐑", - "s": "⒮§$₴5ssⓢₛꜱʂƽςѕꙅտֆꭶꮥꮪᔆᔕꓢ丂𝐒", + "s": "⒮§$₴ssⓢₛꜱʂƽςѕꙅտֆꭶꮥꮪᔆᔕꓢ丂𝐒", "t": "⒯⊤⟙ℑttⓣₜᴛŧƫƭτⲧтፕꭲꮏキꓔ千", "u": "⒰*∪⋃uuⓤꞟᴜꭎꭒɥvʋυսሀሁᑌꓴ𝐔-", "v": "⒱℣√∨⋁☑✅✔✔️۷٧uvvⅴⓥⱽᴠνѵⴸꮙꮩᐯᐺꓦ𝐕", @@ -64,8 +64,9 @@ export default function tryCensor(text: string, strikeShift = 0) { words[index] ??= []; return string.replaceAll(regexp, (word) => { - words[index]?.push(word); + if (!Number.isNaN(+word)) return word; + words[index]?.push(word); return word.length < 3 ? "#".repeat(word.length) : word[0] + "#".repeat(word.length - 1);