telegram

package
v0.0.0-...-95b083d Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notify

type Notify interface {
	PushNotify(ctx context.Context, chatId int64, message string) error
	Stop()
}

type TelegramBot

type TelegramBot struct {
	// contains filtered or unexported fields
}

func NewTelegramBot

func NewTelegramBot(logger *logger.Logger, token string) (*TelegramBot, error)

func (*TelegramBot) Handle

func (t *TelegramBot) Handle(command string, handler func(ctx context.Context, args []string) (interface{}, error))

func (*TelegramBot) PushNotify

func (t *TelegramBot) PushNotify(ctx context.Context, chatId int64, message string) error

func (*TelegramBot) Stop

func (t *TelegramBot) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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