sender

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeferredMessage

type DeferredMessage struct {
	Method string

	ChatID int64  // for copyMessage, forwardMessage and sendMessage
	Text   string // for sendMessage
	// contains filtered or unexported fields
}

type SendResult

type SendResult struct {
	ChatID      int64
	Msg         string
	Error       error
	MessageID   int64
	ForwardDate int
}

type Sender

type Sender struct {
	sync.RWMutex

	Bot    *bot.Bot
	Config *conf.Config
	// contains filtered or unexported fields
}

func InitSender

func InitSender(lgr *slog.Logger, config *conf.Config) (*Sender, error)

func (*Sender) MakeRequestDeferred

func (s *Sender) MakeRequestDeferred(dm DeferredMessage, callback func(s SendResult) error)

func (*Sender) SendResult

func (sender *Sender) SendResult(s SendResult) error

Jump to

Keyboard shortcuts

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