Skip to content

feat(say): facelift — send-then-confirm ordering, cleaner copy#59

Merged
Xiza73 merged 1 commit into
devfrom
feat/say-facelift
May 8, 2026
Merged

feat(say): facelift — send-then-confirm ordering, cleaner copy#59
Xiza73 merged 1 commit into
devfrom
feat/say-facelift

Conversation

@Xiza73

@Xiza73 Xiza73 commented May 8, 2026

Copy link
Copy Markdown
Owner

Summary

Primer comando del facelift de mod (1/6). /say ya andaba bien funcionalmente; este PR aplica un fix de ordering relevante y limpia los strings.

Cambios

Behavior fix

channel.send ahora se ejecuta antes del interaction.reply de confirmación. Si el bot no tiene permiso Send Messages en el canal y channel.send falla, el catch dispara y errorHandler puede responder porque la interaction aún no fue replied. La versión anterior respondía 'Listo.' primero y dejaba al usuario sin saber que el mensaje nunca se publicó.

Cosmético

  • description: `Xiza Bot repite lo que dices` → `Repite un mensaje en el canal`
  • options descriptions más claras
  • confirmation: `Listo.` → `✅ Mensaje enviado.`
  • examples agregados

Branding decision (no aplico el footer)

El embed cuando `as_embed:true` mantiene white color y sin footer Xiza Bot. La convención de branding aplica a embeds de voz-del-bot; `/say` está amplificando un mensaje del moderador y debe leerse como tal, no como anuncio del bot.

Test plan

  • `pnpm test` → 232/232 (was 231, +1 nuevo: send-before-reply ordering)
  • `tsc --noEmit` → limpio
  • `/say message:hola` → mensaje plain en el canal + ephemeral '✅ Mensaje enviado.'
  • `/say message:hola as_embed:true` → embed blanco con el texto, sin firma
  • Sin perm ManageMessages → notice ephemeral

Behavior change: channel.send fires BEFORE the ephemeral confirmation. If the
bot lacks Send permission in the channel and channel.send throws, the catch
fires and errorHandler can still reply because the interaction hasn't been
replied to yet. The original ordering replied first, so a failed send left
the user with 'Listo.' but no actual message in the channel.

Cosmetic:
- description: 'Xiza Bot repite lo que dices' → 'Repite un mensaje en el canal'
- option message: 'Texto a repetir' → 'Texto a publicar'
- option as_embed: 'Mandarlo como embed' → 'Publicar como embed (default: false)'
- confirmation: 'Listo.' → '✅ Mensaje enviado.'
- examples added

Branded as_embed embed intentionally keeps the white color and NO footer —
this command is a moderator amplifying a message, not a bot-branded
announcement. The brand convention applies to bot-voice embeds, not to
content the bot is repeating on someone's behalf.

Tests: send-before-reply ordering, embed-shape (no footer/author), existing
perm-rejection + ManageMessages check kept.
@Xiza73 Xiza73 merged commit c8e6cb9 into dev May 8, 2026
2 checks passed
@Xiza73 Xiza73 deleted the feat/say-facelift branch May 8, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant