Skip to content

Add FableBot: standalone Discord bot-account poster project - #9

Draft
ernop wants to merge 1 commit into
masterfrom
cursor/fablebot-discord-poster-8477
Draft

Add FableBot: standalone Discord bot-account poster project#9
ernop wants to merge 1 commit into
masterfrom
cursor/fablebot-discord-poster-8477

Conversation

@ernop

@ernop ernop commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

New FableBot/ console project in MultiImageClient.sln: posts text and/or file attachments into one Discord channel as a bot account (Discord REST v10, Authorization: Bot <token>, no gateway in v1). The v1 target is a private channel on the owner's server. Full requirements, settled decisions, and the owner setup checklist are in docs/fablebot-discord-prd.md.

Workflow impact

  • No existing run mode changes. The vibecoders webhook sender is untouched.
  • Settings.Validate() gains fail-closed validation for the new pair FableBotDiscordBotToken + FableBotDiscordChannelId (both blank = disabled; one without the other, malformed token, or non-numeric channel id fails settings load).

Required settings updates

Optional. To enable FableBot, add to settings.json:

"FableBotDiscordBotToken": "<raw bot token>",
"FableBotDiscordChannelId": "<numeric channel id>"

Works with a newly created bot application or the existing SocialAI bot token (checklist for both in the PRD).

Usage

dotnet run --project FableBot -- --check
dotnet run --project FableBot -- --message "hello" --file saves/example.png

Behavior

  • Identity + channel are resolved before every post; a bad token or invisible channel is a specific error, and the channel lookup supplies the guild id for the printed jump link.
  • Local fail-closed limits: 2000 chars, 10 files, 10 MiB/file, no empty messages — rejected, never truncated or split.
  • allowed_mentions: {"parse": []} on every post, so pasted mentions never ping.
  • Attachment content types from magic bytes (PNG/JPEG/WEBP/GIF/MP4); bytes travel verbatim.
  • No retry on 429 in v1; Discord's body (with retry_after) is surfaced as the failure.

Testing

  • dotnet build MultiImageClient.sln — 0 errors (warnings pre-existing).
  • dotnet test — 247 passed (6 new in FableBotTests: snowflake/token normalization, message limits, content-type sniffing, jump-link identity, settings pair validation).
  • CLI smoke: --help, missing settings file (exit 1), settings without FableBot keys (exit 1 with setup pointer).
  • A live post needs the owner's bot token, which is not on this VM: after filling in the two settings keys, run dotnet run --project FableBot -- --check, then a real --message post.
Open in Web Open in Cursor 

New FableBot/ console project posts text + file attachments into one
Discord channel via REST v10 with a bot token. Config through the
standard settings.json (FableBotDiscordBotToken +
FableBotDiscordChannelId, both-or-neither, fail-closed validation in
Settings.Validate). --check verifies token + channel without posting.
Works with a new bot application or the existing SocialAI bot token.
PRD in docs/fablebot-discord-prd.md; tests in FableBotTests.

Co-authored-by: Ernest French <ernestfrench@gmail.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.

2 participants