Removed APIs
Last updated
This page lists public symbols that no longer exist in go-bot, the version that removed them, and what to use instead.
v0.5.0: platform packages moved under core/
The
telegram, discord, and line packages moved from the module root to core/. Every symbol below still exists with the same name and signature in the new package (except SendVoice, see the next section); only the import path changed.| Old package (last in v0.4.3) | Symbols | Status | Replacement |
|---|---|---|---|
github.com/pardnchiu/go-bot/telegram | Bot, ChatStatus, FileType, Input, MessageOption, New, Option, ReplyHandler, SendType, Status, StatusOption, WithHTTPClient, WithPollTimeout, WithSendType, WithStatusEmoji, WithStatusSendType; methods Close, Delete, FinishStatus, Reply, Save, Send, SendFile, SendInput, SendMultiSelect, SendPhoto, SendSelect, SendStatus, SendVoice, Start, Status | Removed in v0.5.0 | github.com/pardnchiu/go-bot/core/telegram |
github.com/pardnchiu/go-bot/discord | Bot, ChannelStatus, Input, New, ReplyHandler, Status, StatusOption, WithStatusEmoji; methods Close, Delete, FinishStatus, Reply, Save, Send, SendFiles, SendInput, SendMultiSelect, SendSelect, SendStatus, SendVoice, Start, Status | Removed in v0.5.0 | github.com/pardnchiu/go-bot/core/discord |
github.com/pardnchiu/go-bot/line | Bot, Input, New, Option, ReplyHandler, Status, WithPath; methods Close, Reply, Save, Send, Start, Status | Removed in v0.5.0 | github.com/pardnchiu/go-bot/core/line |
- // before (v0.4.x)
- import "github.com/pardnchiu/go-bot/telegram"
- // after (v0.5.0+)
- import "github.com/pardnchiu/go-bot/core/telegram"
v0.5.0: tts package and text-based SendVoice
| Symbol | Status | Last version | Replacement |
|---|---|---|---|
tts.Get(ctx, apiKey, text string) ([]byte, error) (Gemini text-to-speech, ffmpeg conversion to OGG/OPUS) | Removed in v0.5.0 | v0.4.3 | No public replacement; generate the OGG/OPUS file with your own TTS service |
telegram.SendVoice(ctx, chatID, text, apiKey, caption...) | Signature changed, removed in v0.5.0 | v0.4.3 | SendVoice(ctx, chatID, path, caption...) in core/telegram |
discord.SendVoice(ctx, channelID, replyTo, text, apiKey, caption...) | Signature changed, removed in v0.5.0 | v0.4.3 | SendVoice(ctx, channelID, replyTo, path, caption...) in core/discord |
The new
SendVoice signatures end in caption ...string, so old calls still compile: the text is treated as a file path and the API key is posted as the caption. Check every SendVoice call by hand when upgrading.