feat(channels/telegram): Telegram 渠道插件(Bot API 长轮询/Webhook + file_id 媒体 + 主动推送强)
This commit is contained in:
1 parent
0b036645bb
commit
f9f5a78a02
12 files changed
+1983
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package telegram
|
||||
|
||||
import "errors"
|
||||
|
||||
// Sentinel errors returned by the Telegram adapter. Consumers test for them
|
||||
// with errors.Is; failures that mean "not connected" wrap adapter.ErrNotConnected
|
||||
// so the shared channel sentinel still matches.
|
||||
var (
|
||||
// ErrMissingToken is returned when no BotToken is configured.
|
||||
ErrMissingToken = errors.New("telegram: missing bot token")
|
||||
// ErrBadResponse is returned when the Bot API replies with OK=false or an
|
||||
// unexpected payload shape.
|
||||
ErrBadResponse = errors.New("telegram: bad bot api response")
|
||||
// ErrNoChatTarget is returned when an outbound message carries no usable
|
||||
// conversation/group identifier.
|
||||
ErrNoChatTarget = errors.New("telegram: message has no target chat")
|
||||
)
|
||||
Reference in new issue
Block a user