sender

package
v0.0.0-...-816240f Latest Latest
Warning

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

Go to latest
Published: May 27, 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 *config.Config
	Price  *price.Price
	// contains filtered or unexported fields
}

func InitSender

func InitSender(ctx context.Context, logger *slog.Logger, config *config.Config, pr *price.Price) (*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