BotNetwork

One codebase, many platforms: adapters for Telegram, Discord and Slack

The domain should not import discord.js or grammY. Adapters should.

Guide1 min readUpdated

Suggested layout

  • core/ — intents, policies, pure functions, tests
  • adapters/telegram/ — update parsing, sendMessage wrappers
  • adapters/discord/ — interactions, embeds
  • adapters/slack/ — Bolt listeners
  • host/ — HTTP server, workers, cron

Normalize early

Map each platform event to a small internal type: { platform, chatId, userId, text, interactionId }.

Limits differ

Message length, button caps and markdown dialects differ. Put splitting and escaping at the adapter edge. Use the message splitter and markdown escape tools while developing.

Feature flags

Not every platform gets every feature on day one. Gate with config.

Related comparisons and tools