Skip to content

feat: delete-all button and language dropdown for multi-message code blocks#550

Merged
danthe1st merged 7 commits into
Java-Discord:mainfrom
Neil-Tomar:feat/format-code-message-linking
Jul 11, 2026
Merged

feat: delete-all button and language dropdown for multi-message code blocks#550
danthe1st merged 7 commits into
Java-Discord:mainfrom
Neil-Tomar:feat/format-code-message-linking

Conversation

@Neil-Tomar

Copy link
Copy Markdown
Contributor

What

Multi-message formatted code blocks now have two interactions, backed by a small message-linking helper:

  • Delete-all button — removes every message of the block in one click
  • Language dropdown (ephemeral) — re-colors every chunk to a chosen language

How

  • LinkedMessages resolves the block from the component's message (getHistoryBefore/After), touching only the bot's own messages.
  • FormatCodeInteractionHandler handles the delete button and the language dropdown.
  • Permission: requester / staff / owner (same rule as the existing delete button).

Open questions

  • The language dropdown is ephemeral per your suggestion, so it's a one-time picker that's gone on reload — happy to make it a permanent public control instead.
  • Rare edge case: two simultaneous formats could interleave bot messages; the resolver is best-effort there.

…ching

Delete-all button removes every message of a block; ephemeral language dropdown re-colors every chunk. Only the bot's own messages are touched.
@Neil-Tomar Neil-Tomar requested a review from a team as a code owner July 4, 2026 15:41
@Neil-Tomar Neil-Tomar requested a review from danthe1st July 5, 2026 13:24
@Neil-Tomar Neil-Tomar requested a review from danthe1st July 5, 2026 16:34
@Neil-Tomar Neil-Tomar requested a review from danthe1st July 6, 2026 12:57
@Neil-Tomar Neil-Tomar force-pushed the feat/format-code-message-linking branch from 43bd07e to 8dece97 Compare July 9, 2026 07:48
@Neil-Tomar Neil-Tomar requested a review from danthe1st July 11, 2026 10:06

@danthe1st danthe1st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two very minor things. If you fixed those, I'll start testing everything.

@Neil-Tomar Neil-Tomar requested a review from danthe1st July 11, 2026 13:28

@danthe1st danthe1st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danthe1st danthe1st merged commit cf9421d into Java-Discord:main Jul 11, 2026
3 checks passed
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.

2 participants