sender

package
v0.0.0-...-f1ba381 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 17 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
	BotUser *models.User
	// contains filtered or unexported fields
}

func InitSender

func InitSender(ctx context.Context, logger *slog.Logger, config *config.Config) (*Sender, error)

func (*Sender) HandleStartCommand

func (s *Sender) HandleStartCommand(ctx context.Context, b *bot.Bot, update *models.Update)

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