telegram

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageFileData

type ImageFileData struct {
	Data     []byte
	Filename string
}

type SDBot

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

func NewBot

func NewBot(botToken string, defailtHandlerFunc bot.HandlerFunc) (*SDBot, error)

func (*SDBot) DeleteMessage

func (b *SDBot) DeleteMessage(ctx context.Context, deletingMessage *models.Message) error

func (*SDBot) EditMessage

func (b *SDBot) EditMessage(ctx context.Context, editableMsg *models.Message, newText string) error

func (*SDBot) GetFile

func (b *SDBot) GetFile(ctx context.Context, fileId string, getWriterFunc func(fileSize int64) io.Writer) (d []byte, err error)

func (*SDBot) RegisterPrefixHandler

func (b *SDBot) RegisterPrefixHandler(pattern string, handlerFunc bot.HandlerFunc) string

func (*SDBot) SendMediaGroup

func (b *SDBot) SendMediaGroup(ctx context.Context, replyToMsg *models.Message, media []models.InputMedia) error

func (*SDBot) SendReplyToMessage

func (b *SDBot) SendReplyToMessage(ctx context.Context, replyToMsg *models.Message, text string) (msg *models.Message)

func (*SDBot) SendTextToAdmins

func (b *SDBot) SendTextToAdmins(ctx context.Context, adminUserIds []int64, s string)

func (*SDBot) Start

func (b *SDBot) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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