bot

package
v0.0.0-...-16cd069 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MimeJpeg      = "image/jpeg"
	MimeGif       = "image/gif"
	MimePng       = "image/png"
	MimePdf       = "application/pdf"
	MimeMpeg      = "audio/mpeg"
	MimeQuicktime = "video/quicktime"
	MimeMp4       = "video/mp4"
	MimeWebp      = "image/webp"

	Xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)

Variables

This section is empty.

Functions

func InitBotService

func InitBotService() error

Types

type TgBot

type TgBot struct {
	// contains filtered or unexported fields
}
var Bot *TgBot

func NewBot

func NewBot() (*TgBot, error)

func (*TgBot) Check4Config

func (p *TgBot) Check4Config()

func (*TgBot) Check4ConfigOnce

func (p *TgBot) Check4ConfigOnce(checkConfig types.CheckConfig)

func (*TgBot) CheckAdmin

func (p *TgBot) CheckAdmin(ctx context.Context, c tb.Context) error

func (*TgBot) DefaultHandle

func (p *TgBot) DefaultHandle()

func (*TgBot) Edit

func (p *TgBot) Edit(msg tb.Editable, what interface{}, opts ...interface{}) (*tb.Message, error)

func (*TgBot) Handle

func (p *TgBot) Handle(endpoint interface{}, h tb.HandlerFunc, m ...tb.MiddlewareFunc)

func (*TgBot) Reply

func (p *TgBot) Reply(to *tb.Message, what interface{}, opts ...interface{}) (*tb.Message, error)

func (*TgBot) RunAlways

func (p *TgBot) RunAlways(sign chan os.Signal)

func (*TgBot) Send

func (p *TgBot) Send(to tb.Recipient, what interface{}, opts ...interface{}) (*tb.Message, error)

func (*TgBot) Start

func (p *TgBot) Start()

func (*TgBot) UnlockCheck

func (p *TgBot) UnlockCheck(req UnlockCheckReq)

type UnlockCheckReq

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

Jump to

Keyboard shortcuts

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