tgb

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 4 Imported by: 0

README

telegram-bot

Telegram bot with rate limit

Rate limit

https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this

  • chat
    • one message per second
  • 30 messages per second
  • 20 messages per minute to the same group

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Sugar *zap.SugaredLogger
	// contains filtered or unexported fields
}

func New

func New(token string, coll *mongo.Collection, Sugar *zap.SugaredLogger) (*Bot, error)

func (*Bot) Serve

func (b *Bot) Serve(ctx context.Context, ch <-chan tgbotapi.Chattable) error

Jump to

Keyboard shortcuts

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