telegram

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bot

func Bot(cfg BotConfig) (*telego.Bot, error)

func BotHandler

func BotHandler(ctx context.Context, bot *telego.Bot, updates <-chan telego.Update) (*th.BotHandler, error)

func Webhook

func Webhook(ctx context.Context, cfg WebhookConfig, bot *telego.Bot) (<-chan telego.Update, error)

Types

type BotConfig

type BotConfig struct {
	BotToken string
}

type WebhookConfig

type WebhookConfig struct {
	BotToken   string
	WebhookURL url.URL
}

func (WebhookConfig) LogValue

func (w WebhookConfig) LogValue() slog.Value

LogValue satisfies the slog.LogValuer interface for WebhookConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL