Repository navigation
RU Platform Adapters
English: EN-Platform-Adapters
| Capability | Telegram | VK | Discord |
|---|---|---|---|
| Text / callbacks / inline buttons | ✅ | ✅ | ✅ |
| Edit / private / send with ref | ✅ | ✅ | ✅ |
| Attachments | ✅ | ✅ | ✅ |
| Long polling runtime | ✅ | ✅ | — |
| Slash commands | — | — | ✅ |
| Communities / wall posts | — | ✅ | — |
| Moderation | — | partial | planned |
Все три adapters поддерживают Send, SendPrivate, SendWithRef, AnswerCallback, Edit и EditByRef.
app.Platform(telegram.New(telegram.Config{Token: os.Getenv("TELEGRAM_TOKEN")}))
app.Platform(vk.New(vk.Config{Token: os.Getenv("VK_TOKEN"), GroupID: groupID}))
app.Platform(discord.New(discord.Config{Token: os.Getenv("DISCORD_TOKEN")}))- Telegram optional:
ServerURL,ProxyURL, timeouts,Debug,SkipGetMe. - VK requires
Tokenand positiveGroupID; optionalDebug. - Discord optional:
GuildID, applicationCommands,Intents,DisableTextCommands.
Discord уже поддерживает slash commands, subcommands, defer/respond/edit/followup, ephemeral responses, buttons, embeds, files и DM. Timeout/kick/ban, role management и channel overwrites ещё не завершены.
Adapters автоматически получают только event types, нужные зарегистрированным routes. Native client доступен через typed From(ctx) только после запуска adapter.
Для локализации Telegram messages и callbacks передают язык отправителя, а Discord commands и component interactions — locale interaction. В VK events и обычных Discord messages Event.Locale остаётся пустым, поэтому используется сохранённый выбор или default bundle. См. Локализация.
Capability flag
Webhooksсуществует, но публичного webhook startup path пока нет. Документированный runtime использует polling для Telegram/VK и Gateway для Discord.