telegram

package
v0.0.0-...-2ea4f13 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Telegram

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

Telegram bot type

func NewTelegramBot

func NewTelegramBot(token string, database *roles.Roles) (*Telegram, error)

NewTelegramBot create a new Telegram bot instance from a token Returns a pointer to Telegram struct

func (*Telegram) HandleUpdate

func (tg *Telegram) HandleUpdate(update tgbotapi.Update)

func (*Telegram) ManageUpdates

func (tg *Telegram) ManageUpdates(handler func(tgbotapi.Update)) error

ManageUpdates starts a polling loop and handle every update with an handler function

Jump to

Keyboard shortcuts

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