tgbot

package
v0.0.0-...-9908d45 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BotMap = make(map[uint]*Bot)
View Source
var (
	ErrNoAccount = errors.New("no account")
)

Functions

func CheckRobot

func CheckRobot()

func PicThumb

func PicThumb(picBytes []byte) ([]byte, error)

图片缩略操作

Types

type Bot

type Bot struct {
	BotId uint
	API   *tgbotapi.BotAPI
	// contains filtered or unexported fields
}

func NewBot

func NewBot(botId uint) (*Bot, error)

func (*Bot) Release

func (b *Bot) Release()

func (*Bot) Start

func (b *Bot) Start()

type HookRequest

type HookRequest struct {
	MessageID int             `json:"messageId"`
	From      HookRequestFrom `json:"from"`
	Date      int             `json:"date"` // 10位时间戳
	Text      string          `json:"text"`
}

type HookRequestFrom

type HookRequestFrom struct {
	ID        int64  `json:"id"`
	IsBot     bool   `json:"isBot"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	UserName  string `json:"userName"`
}

Jump to

Keyboard shortcuts

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