1
0
Fork 0
Commit graph

1 commit

Author SHA1 Message Date
f478f38938 fix(bot): route poll buttons to their interaction handler
The InteractionCreate dispatcher in index.ts forwarded only customIds starting
with `ptf-att:`, so poll buttons (`ptf-poll:`) were never acknowledged: Discord
answered every press with "This interaction failed" and the message looked
broken while the same vote worked on the web. The post-op rating button had the
same defect and had never worked.

The prefix list now lives with the handler (UNIT_BUTTON_PREFIXES /
isUnitButtonCustomId) and the dispatcher reads it, so a prefix the handler
answers to cannot be filtered out above it. A `ptf-` button nothing claims
replies with a toast and logs a warning instead of failing silently.

Regression test pins the predicate to the customIds buildPollRows actually
generates, so the two halves cannot drift apart again.
2026-12-02 10:02:39 -05:00