sTelegram

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Bot    *tgbotapi.BotAPI
	ChatId int64
	Token  string
	Func   ReadFunc
	Sleep  time.Duration
	Queue  chan SendObject
}

func NewBot

func NewBot(token string, chat_id int64, read_func ReadFunc) *Bot

func (Bot) Log added in v0.5.6

func (t Bot) Log()

func (*Bot) Send

func (t *Bot) Send(obj SendObject)

func (*Bot) Start

func (t *Bot) Start()

type ReadFunc

type ReadFunc func(update *tgbotapi.Update) string

type SendObject added in v0.4.7

type SendObject struct {
	ChatId  int64  `json:"chat_id"`
	Message string `json:"msg"`
}

Jump to

Keyboard shortcuts

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