feat(bot): per-guild posting appearance via webhook (name + logo)#79
Merged
Conversation
A shared multi-tenant bot can't have a per-guild profile, so let each guild brand the messages the bot *posts* instead. When a guild sets a "posting name" (Bot settings), the bot posts forms and the review embed through a bot-owned webhook using that name + the guild's branding logo as the avatar. Components still work (the webhook is application-owned); falls back to a normal bot message on threads or without the Manage Webhooks permission. - shared: `botConfig.postName` (optional, 1–80 chars). - bot: `postBranded(channel, guildId, payload)` helper; used by `/forms post` and the new-submission review embed (`deliverReview`). - web: posting-name field in the Bot settings form; bot-config PATCH already passes it through. i18n DE/EN. Avatar reuses the guild's existing branding logo (served public WebP), so no new upload path.
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.
A shared multi-tenant bot can't have a per-guild Discord profile (avatar/username/bio are global). Instead, let each guild brand the messages the bot posts.
How it works
When a guild sets a Posting name (Bot settings), the bot sends forms and the review embed through a bot-owned webhook using that name + the guild's branding logo as the avatar. Because the webhook is owned by the application, message components keep working (form Link button, Accept/Reject buttons → interactions still route to the bot). Falls back to a normal bot message on threads or when the bot lacks the Manage Webhooks permission.
Changes
botConfig.postName(optional, 1–80 chars).postBranded(channel, guildId, payload)helper (fetch/create a bot-owned webhook, send withusername+avatarURL); wired into/forms postanddeliverReview(new-submission review embed).Validation
pnpm typecheck,pnpm lint,pnpm buildgreen. After deploy the bot reloads (tsx) and the webhook path activates per-guild once a posting name is set.