Skip to content

feat(bot): per-guild posting appearance via webhook (name + logo)#79

Merged
Musiker15 merged 1 commit into
mainfrom
feat/bot-per-guild-posting
Jun 21, 2026
Merged

feat(bot): per-guild posting appearance via webhook (name + logo)#79
Musiker15 merged 1 commit into
mainfrom
feat/bot-per-guild-posting

Conversation

@Musiker15

Copy link
Copy Markdown
Member

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

  • sharedbotConfig.postName (optional, 1–80 chars).
  • botpostBranded(channel, guildId, payload) helper (fetch/create a bot-owned webhook, send with username + avatarURL); wired into /forms post and deliverReview (new-submission review embed).
  • web — posting-name field in the Bot settings form; the bot-config PATCH passes it through. i18n DE/EN.
  • Avatar reuses the guild's existing branding logo (the public WebP serve route), so there's no new upload path.

Validation

pnpm typecheck, pnpm lint, pnpm build green. After deploy the bot reloads (tsx) and the webhook path activates per-guild once a posting name is set.

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.
@Musiker15 Musiker15 merged commit b1a6c53 into main Jun 21, 2026
3 checks passed
@Musiker15 Musiker15 deleted the feat/bot-per-guild-posting branch June 21, 2026 19:19
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