Refactor self-role management to use a role builder interface

- Replaced the text area for role input with a structured role builder, enhancing user experience and reducing input errors.
- Updated the self-role management logic to handle roles as structured objects instead of plain text, improving data integrity.
- Introduced new functions for parsing and validating roles, ensuring compliance with the new builder format.
- Enhanced error handling for role creation and updates, providing clearer feedback for missing or invalid data.
- Updated localization files to reflect changes in role management terminology and instructions.
This commit is contained in:
TheOnlyMace
2026-07-25 15:53:27 +02:00
parent ba2d144038
commit 67ac16d36b
10 changed files with 955 additions and 192 deletions

View File

@@ -736,8 +736,19 @@
},
"description": "Beschreibung",
"roles": "Rollen",
"rolesPlaceholder": "roleId | Label | Emoji | Beschreibung (eine pro Zeile)",
"rolesHint": "Eine Rolle pro Zeile: roleId | Label | Emoji (optional) | Beschreibung (optional).",
"roleSelect": "Rolle",
"roleLabel": "Label",
"roleLabelPlaceholder": "Anzeigename auf dem Button",
"roleEmoji": "Emoji",
"roleDescription": "Beschreibung (optional)",
"roleDescriptionPlaceholder": "Kurztext für Dropdown",
"addRole": "Rolle hinzufügen",
"emojiPlaceholder": "Emoji suchen…",
"emojiServer": "Server",
"emojiUnicode": "Standard",
"emojiRequired": "Im Reaktions-Modus braucht jede Rolle ein Emoji.",
"tooManyRoles": "Maximal 25 Rollen pro Panel.",
"rolesBuilderHint": "Wähle Rolle, Label und optional Emoji/Beschreibung. Im Reaktions-Modus ist ein Emoji Pflicht.",
"create": "Panel erstellen",
"listTitle": "Self-Role-Panels",
"listDescription": "Vorhandene Panels für diesen Server.",

View File

@@ -736,8 +736,19 @@
},
"description": "Description",
"roles": "Roles",
"rolesPlaceholder": "roleId | label | emoji | description (one per line)",
"rolesHint": "One role per line: roleId | label | emoji (optional) | description (optional).",
"roleSelect": "Role",
"roleLabel": "Label",
"roleLabelPlaceholder": "Button display name",
"roleEmoji": "Emoji",
"roleDescription": "Description (optional)",
"roleDescriptionPlaceholder": "Short text for dropdown",
"addRole": "Add role",
"emojiPlaceholder": "Search emoji…",
"emojiServer": "Server",
"emojiUnicode": "Standard",
"emojiRequired": "Reaction mode requires an emoji for every role.",
"tooManyRoles": "Maximum 25 roles per panel.",
"rolesBuilderHint": "Pick a role, label, and optional emoji/description. Reaction mode requires an emoji.",
"create": "Create panel",
"listTitle": "Self-role panels",
"listDescription": "Existing panels for this server.",