feat: show who reacted, and stop curiosities flooding chat

Reactions only ever showed counts, so with several reactors nobody could
tell who had reacted. Naming everyone on its own line does not scale, so
names now appear in three progressively larger places: a hover tooltip per
button (Java only), a one-line closing summary naming the first
resumo-nomes (3) and collapsing the rest to "+N", and /reacoes for the full
breakdown sent privately.

Reactors' names are captured at react time so the summary survives them
logging off.

Two separate causes of chat flooding:
- every join fired its own curiosity, so a wave of joins produced one each.
  Automatic triggers are now rate-limited by intervalo-minimo-segundos
  (120); a typed /curiosidade still bypasses it.
- a curiosity cost two messages. The button row is now appended to the
  headline instead of being broadcast separately.

Also fixes "1 horas" — CuriosityFactory had its own duration formatting
that missed the earlier plural fix; it now uses Msg.duration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ActvLGJApdxEAd2yfKPwqv
This commit is contained in:
marcos
2026-08-04 21:38:28 +00:00
parent 987ee13d74
commit be6d34f456
8 changed files with 252 additions and 55 deletions
+10
View File
@@ -34,6 +34,11 @@ intervalo-minutos: 20
# Tempo mínimo antes do mesmo jogador ser citado de novo.
cooldown-minutos: 30
# Intervalo mínimo entre curiosidades automáticas, em segundos. Sem isso,
# cinco pessoas entrando juntas geram cinco curiosidades e enchem a tela.
# Não afeta /curiosidade digitado à mão.
intervalo-minimo-segundos: 120
# Quantas curiosidades recentes lembrar para não repetir.
evitar-repetir: 15
@@ -54,6 +59,11 @@ reacoes-ativas: true
# Por quanto tempo a barra de reações fica visível, em segundos.
janela-reacao-segundos: 90
# Quantos nomes cabem no resumo de reações antes do resto virar "+N".
# O resumo é sempre UMA linha, por mais gente que reaja; para ver a lista
# completa use /reacoes (privado, não polui o chat).
resumo-nomes: 3
# Por quanto tempo um clique ainda conta depois que a barra some. As pessoas
# rolam o chat e clicam minutos depois; descartar esses cliques em silêncio
# parece defeito.
+4
View File
@@ -33,6 +33,10 @@ commands:
reagir:
description: Reage à última mensagem.
usage: /reagir <chave>
reacoes:
description: Mostra quem reagiu à última mensagem.
usage: /reacoes
aliases: [quemreagiu]
palpite:
description: Palpita na adivinha aberta.
usage: /palpite <nome>