bot

package
v0.0.0-...-47bbb21 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part

func Part[T any](slice []T, length int) (new []T, modified []T)

Part function splits slice on specified position

Types

type Bot

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

func New

func New(ctx context.Context, api *tg.Client) *Bot

func (Bot) ForwardMessages

func (b Bot) ForwardMessages(source db.Chat, destination tg.InputPeerClass, messages []db.Message, NoQuote bool) error

func (Bot) GetHistory

func (b Bot) GetHistory(chatId int64, accessHash int64, limit int, offsetId int) ([]tg.MessageClass, error)

func (Bot) GetMessageText

func (b Bot) GetMessageText(chat tg.InputChannel, msgID int) (string, error)

func (Bot) GetMessagesReactions

func (b Bot) GetMessagesReactions(chat db.Chat, messages []db.Message, delay time.Duration, logger *zap.SugaredLogger) (
	reactions []*tg.UpdateMessageReactions,
	err error,
)

func (Bot) GetReactions

func (b Bot) GetReactions(chatId int64, accessHash int64, messages []int) ([]*tg.UpdateMessageReactions, error)

func (Bot) GetReactionsList

func (b Bot) GetReactionsList(msg db.Message, accessHash int64) (*tg.MessagesMessageReactionsList, error)

GetReactionsList returns reactions list for specified message This functions requests only 100 reactions

func (Bot) Reply

func (b Bot) Reply(e tg.Entities, u *tg.UpdateNewChannelMessage, text string) error

Jump to

Keyboard shortcuts

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