telegram

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc added in v0.0.8

type CallbackFunc func(context.Context, Message) error

type Client added in v0.0.8

type Client struct {
	*telegram.BotAPI
	// contains filtered or unexported fields
}

func New added in v0.0.8

func New(token string, opts ...Opt) (*Client, error)

func (*Client) Name added in v0.0.8

func (t *Client) Name() string

func (*Client) Run added in v0.0.8

func (t *Client) Run(ctx context.Context) error

type Message added in v0.0.8

type Message interface {
	Sender() string
	Text() string
	Typing() error
	Reply(context.Context, string, bool) error
}

type Opt added in v0.0.8

type Opt func(*opts) error

A generic option type, which can set options on an agent or session

func WithCallback added in v0.0.8

func WithCallback(fn CallbackFunc) Opt

func WithDebug added in v0.0.8

func WithDebug(v bool) Opt

Jump to

Keyboard shortcuts

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