fix: only protect URLs with explicit http(s):// from !s rewrites#60
Merged
Conversation
Discord.js Collection iterates as [id, Message] pairs, not bare Messages. Passing .values() gives replaceFirstMessage the Message objects it expects. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ing, proxyAuthors leak - config.js: trim whitespace from SearchPhrasesToBlock entries so that 'bad, word' in the env var does not create a ' word' entry that silently bypasses the block - replacer.js: apply normalizeUnicode to the replacement text before the blocked-phrase check, closing the curly-quote bypass - scoring.js: guard parseScoreLine against bare '++' / '--' lines that would insert an empty-string phrase into the DB - reactions.js: cap proxyAuthors Map at 1000 entries (FIFO eviction) to prevent unbounded growth over long uptime Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lents Adds U+201B and U+02BC to the Unicode normalizer so that modifier-letter apostrophes (and other device-specific single-quote substitutions) match regular apostrophes in searches and scored phrases. Applies normalizeUnicode to phrase storage and lookup in scoring so that smart apostrophes and em dashes typed in scored phrases are interchangeable across devices. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Slicing by '!leader ' (with space) consumed the leading '<' of a custom emoji when typed without a space, producing ':name:id>' as the body instead of '<:name:id>'. The regex didn't match, key and display were wrong, and the Easter-egg zero-results message echoed the broken entity literally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Slicing by '!leader ' (with space) consumed the leading '<' of a custom emoji when typed without a space, producing ':name:id>' as the body instead of '<:name:id>'. The regex didn't match, key and display were wrong, and the Easter-egg zero-results message echoed the broken entity literally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The URL extraction regex made the protocol optional, so bare-domain mentions like "fast.com" were being shielded as URLs and skipped during search. A user typing `!s ast/uck` against "hit fast.com" got no match and the bot moved on to the next eligible message, which was confusing. Require the http:// or https:// prefix so casual domain references stay in plain text and are searchable/replaceable, while real links remain protected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
zippy1981
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(https?:\/\/)?), so bare-domain mentions likefast.comwere extracted as URL placeholders and shielded from!s.!s ast/uckagainsthit fast.comskipped the message entirely and rewrote the next eligible one (which containedlast), producing a baffling result.http://orhttps://prefix inURL_RE. Real links stay protected; casual domain references are searchable and replaceable.Test plan
extractUrlscases forfast.comandwww.example.com(no extraction)replaceFirstMessageregression test:hit fast.com+!s ast/uck→author hit f**uck**.com🤖 Generated with Claude Code