mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-06-09 18:14:46 +00:00
5c367399c5
Phase 3 of the 2026-05-09 review remediation plan. Eliminates the helper drift (subjectFor / argAfterCommand / nowMillis / reply / replyHTML / winRate) that previously lived in 3-4 modules, plus the loldle-specific normalize / findChampion / findByExactName. - internal/modules/util/chathelper: SubjectFor, ArgAfterCommand, NowMillis, Reply, ReplyHTML, WinRate. Single canonical SubjectFor shape (group/supergroup -> chat ID, else user ID); WinRate uses math.Round to match JS Math.round (the truncation drift caught in Phase 5b/5c). - internal/champname: Normalize + generic Find[T] / FindByExactName[T] with name-extractor closure. Loldle and loldle-emoji both consume via Champion / EmojiChampion. Migrations: wordle, loldle, loldle-emoji, misc, util/info, util/stickerid. Module-local lookup.go + normalize.go in loldle and loldle-emoji deleted. go test -race -count=1 ./... clean across all 12 packages. Net ~290 lines removed across handler files.