manager

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package manager provides a simple way to manage multiples bots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(botsTokens ...string) (*Manager, error)

NewManager creates a new Manager. botsTokens is a slice of distinct bot tokens

func (*Manager) AddBot

func (m *Manager) AddBot(botToken string) error

func (*Manager) DownloadFileBuffer

func (m *Manager) DownloadFileBuffer(identifier v1.MessageIdentifier, copyChat int64) (*v1.DownloadBufferResult, error)

func (*Manager) DownloadFileReader

func (m *Manager) DownloadFileReader(identifier v1.MessageIdentifier, copyChat int64) (*v1.DownloadReaderResult, error)

func (*Manager) StartUploaderManager

func (m *Manager) StartUploaderManager()

StartUploaderManager starts the uploader manager

This uploader manager will handle requests for getting available bots, and making them available again

func (*Manager) UploadFileBuffer

func (m *Manager) UploadFileBuffer(chatId int64, fileName string, fileData []byte) (v1.MessageIdentifier, error)

func (*Manager) UploadFileReader

func (m *Manager) UploadFileReader(chatId int64, fileName string, fileReader io.Reader) (v1.MessageIdentifier, error)

Jump to

Keyboard shortcuts

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