Alexainc commited on
Commit
c160796
·
1 Parent(s): 3e4404c

Debug: Add logging for rejected word candidates

Browse files
Files changed (1) hide show
  1. bot.js +5 -1
bot.js CHANGED
@@ -186,7 +186,11 @@ bot.on('photo', async (ctx) => {
186
  const forced = targetStart + match.slice(1);
187
  if (isWord(forced)) return forced;
188
 
189
- // 3. Is the raw match a word but starts with wrong letter? (Ignore for this pattern)
 
 
 
 
190
  return null;
191
  })
192
  .filter(w => w !== null)
 
186
  const forced = targetStart + match.slice(1);
187
  if (isWord(forced)) return forced;
188
 
189
+ // Log candidates that are NOT words for debugging
190
+ if (match[0] === targetStart) {
191
+ console.log(`[Pattern Debug] Rejected non-word candidate for ${p}: ${match}`);
192
+ }
193
+
194
  return null;
195
  })
196
  .filter(w => w !== null)