Skip to content

Rebuild the settings with Components V2 - #122

Open
seirenkr wants to merge 2 commits into
Kyrela:mainfrom
seirenkr:feat/components-v2
Open

seirenkr wants to merge 2 commits into
Kyrela:mainfrom
seirenkr:feat/components-v2

Conversation

@seirenkr

Copy link
Copy Markdown
Contributor

Summary

  • /settings, /about and the outputs of the developer commands are rebuilt with Components V2: containers, sections and text displays instead of an embed followed by buttons. The modals wrap their inputs in a Label, as the label of a text input itself is deprecated.
  • The screens, their options and their texts stay the same, and the settings are still browsed with the select menu. Nothing changes in the database and no dependency is added: discore already pins discord.py 2.7.1.
  • src/settings.py is mostly rewritten, so the file itself is easier to read than its diff.

What changes for users

  • A toggle sits next to the state it changes (a section with a button) instead of in a row of buttons under the embed.
  • Websites: still a single select, but its pages are changed from inside the list ("Previous page" and "Next page" options) instead of a button below it.
  • Custom websites: the select describes each website with its fixed domain, and is hidden when there is none.
  • The channels, members, roles and reply method screens start with their description, like the other screens, instead of a title of their own.

Fixes that come with the rewrite

  • The texts are built with the locale of the interaction. discore only sets the locale when a command is invoked, so a screen refreshed by a button could come back in the language of the last command, whoever invoked it.
  • Editing a keyword without changing it no longer answers that it already exists.
  • What is typed in the modals is stripped: a blank keyword is ignored, a custom website without a name is listed by its domain, and a translation language has to be two letters.
  • /remove_premium stops after reporting a failure, instead of answering the interaction twice.

Locales

Six strings that are no longer used are removed and three are added (settings.websites.page, previous_page, next_page), in en-US.yml and ko.yml only. The other languages are left to Crowdin.

Test plan

  • Every screen built in the 32 locales of Discord and checked against its limits (40 components, 4000 characters, 25 options per select). The largest screen uses 20 components.
  • Every button and select of every screen used once and every modal submitted, with and without a premium SKU configured: no exception, no invalid message.
  • Texts, buttons and options of the 108 screens (three server states) compared with the current embeds: the only differences are the ones listed above.
  • /settings and /about used on a test server (desktop client), through a test bot on discord.py 2.7.1 and MariaDB 12.

Not checked on Discord itself: the mobile client, the developer commands and the premium-only buttons. Only the scripts above cover them.

Written with Claude Code (Claude Fable 5.2, credited as co-author of the commits).

🤖 Generated with Claude Code

seirenkr and others added 2 commits November 12, 2026 08:15
Every screen of `/settings` is now a container made of texts, sections and action rows instead of an embed followed
by buttons: a toggle sits next to the state it changes, and the texts are no longer limited by the embed fields.
The modals wrap their inputs in labels, as the label of a text input itself is deprecated.

The screens keep their content and their behaviour. The differences:
- the websites are still listed in a single select, but its pages are changed from inside the list ("Previous page"
  and "Next page" options) instead of a button below it;
- the custom websites select describes each website with its fixed domain, and is hidden when there is none;
- the filter and reply method screens start with their description, like the other screens;
- the texts are built with the locale of the interaction: discore only sets it when a command is invoked, so a
  screen refreshed by a button could come back in the language of the last command, whoever invoked it;
- editing a keyword without changing it no longer answers that it already exists;
- the texts typed in the modals are stripped: a blank keyword is ignored, a custom website without a name is listed
  by its domain, and a translation language has to be two letters.

The strings that are no longer used are removed from the source locale (and from the Korean one).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`/remove_premium` also stops after reporting a failure, instead of answering the interaction a second time.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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