feat(forms): per-form accepted role (overrides guild default)#81
Merged
Conversation
The accepted role could only be set guild-wide (Guild.botConfig). Allow each form to define its own accepted role, falling back to the guild default. - shared: `formSettingsSchema` (`acceptedRoleId`) + `parseFormSettings`, stored in the existing `Form.settings` JSON. - web: `formInputSchema` gains `settings`; create + update routes persist it; `getFormForEdit` selects it; the builder has an "Accepted role ID" field (new/edit pages seed it). i18n DE/EN; bot-settings hint reworded as "default". - bot: on accept, the role is `form.settings.acceptedRoleId ?? guild botConfig.acceptedRoleId`. No migration — Form.settings already exists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The accepted role was only configurable guild-wide (Bot settings). Now each form can set its own accepted role, falling back to the guild default when unset.
Changes
formSettingsSchema(acceptedRoleId) +parseFormSettings, stored in the existingForm.settingsJSON.formInputSchemagainssettings; the create + update routes persist it;getFormForEditselects it; the form builder gets an Accepted role ID field (new/edit pages seed it). i18n DE/EN; the guild Bot-settings hint is reworded to "default (each form can override)".form.settings.acceptedRoleId ?? guild botConfig.acceptedRoleId.No DB migration —
Form.settingsalready existed. typecheck/lint/build green.