tgutil

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCancelButton

func BuildCancelButton(taskID string) tg.KeyboardButtonClass

func ExtFromContext

func ExtFromContext(ctx context.Context) *ext.Context

func ExtWithContext

func ExtWithContext(ctx context.Context, extCtx *ext.Context) context.Context

func GenFileNameFromMessage

func GenFileNameFromMessage(message tg.Message) string

func GetGroupedMessages added in v0.24.0

func GetGroupedMessages(ctx *ext.Context, chatID int64, msg *tg.Message) ([]*tg.Message, error)

func GetMessageByID

func GetMessageByID(ctx *ext.Context, chatID int64, msgID int) (*tg.Message, error)

func GetMessagesRange

func GetMessagesRange(ctx *ext.Context, chatID int64, minId, maxId int) ([]*tg.Message, error)

func InputMessageClassSliceFromInt

func InputMessageClassSliceFromInt(ids []int) []tg.InputMessageClass

func IterMessages added in v0.23.1

func IterMessages(ctx *ext.Context, chatID int64, minId, maxId int) (<-chan MessageItem, error)

func ParseChatID

func ParseChatID(ctx *ext.Context, idOrUsername string) (int64, error)
func ParseMessageLink(ctx *ext.Context, link string) (int64, int, error)

return: ChatID, MessageID, error

Types

type MessageItem added in v0.23.1

type MessageItem struct {
	Message *tg.Message
	Error   error
}

Jump to

Keyboard shortcuts

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