+18
-8
@@ -18,17 +18,27 @@ import (
|
||||
|
||||
// BotWebhookOpts configures Telegram webhook registration and the local HTTP server.
|
||||
type BotWebhookOpts struct {
|
||||
Path string
|
||||
LocalPort int
|
||||
// Path is the local HTTP route that receives Telegram updates.
|
||||
Path string
|
||||
// LocalPort is the TCP port used by the webhook server.
|
||||
LocalPort int
|
||||
// UseStatusPath enables the authenticated /status endpoint.
|
||||
UseStatusPath bool
|
||||
|
||||
URL string
|
||||
Certificate []byte
|
||||
IPAddress string
|
||||
MaxConnections int8
|
||||
AllowedUpdates []tgapi.UpdateType
|
||||
// URL is the public base URL Telegram uses for delivery.
|
||||
URL string
|
||||
// Certificate contains a self-signed public certificate to upload.
|
||||
Certificate []byte
|
||||
// IPAddress fixes the destination IP used by Telegram.
|
||||
IPAddress string
|
||||
// MaxConnections limits simultaneous Telegram webhook connections to 1–100.
|
||||
MaxConnections int8
|
||||
// AllowedUpdates limits the update kinds delivered to the webhook.
|
||||
AllowedUpdates []tgapi.UpdateType
|
||||
// DropPendingUpdates requests deletion of queued updates during registration.
|
||||
DropPendingUpdates bool
|
||||
SecretToken string
|
||||
// SecretToken authenticates Telegram requests and the optional status endpoint.
|
||||
SecretToken string
|
||||
}
|
||||
|
||||
// NewBotWebhookOpts returns webhook options with the default path, local port, and max connections.
|
||||
|
||||
Reference in New Issue
Block a user