Conversation
It turned out to be quite different to integrate it with wtf bot, so it was worthwhile extracting into own thing.
Pull Request Test Coverage Report for Build 22035658461Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
couple of issues:
otherwise the design is clean, follows the WTF bot pattern well, and the code is readable |
- Replace \b with Unicode-aware boundaries (?:^|[^\p{L}]) / (?:[^\p{L}]|$)
since Go RE2 \b only matches ASCII word chars
- Skip categories with empty Responses slice to prevent rand.Int63n(0) panic
- Add Cyrillic matching tests and empty responses tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
It turned out to be quite different to integrate it with wtf bot, so it was worthwhile extracting into own thing.