telegrambot

package
v0.0.0-...-7011171 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(token string, fileDirectory string, hook Hook) (*gotgbot.Bot, error)

New return a started telegram bot

Types

type Hook

type Hook interface {
	AddError(err error)      // Called when an error append
	Duration(duration int64) // Called after a successful call with the duration (in miliseconds) to handle the telegram command command
}

type Metrics

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

Metrics implements the Hook interface

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

func (*Metrics) AddError

func (w *Metrics) AddError(err error)

func (*Metrics) Duration

func (w *Metrics) Duration(duration int64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳