tghbot

package
v0.0.0-...-03812c6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TmplIssue = `` /* 156-byte string literal not displayed */
View Source
const TmplPR = `` /* 187-byte string literal not displayed */
View Source
const TmplPush = `` /* 197-byte string literal not displayed */
View Source
const TmplRelease = `{{define "release" -}}
🎉 Новый релиз {{ .Repo.Name }}! {{ .Release.Name }}

{{ .Release.Body }}
{{end}}
`

Variables

This section is empty.

Functions

func WithLogger

func WithLogger(log *zap.Logger) func(*Bot)

func WithStorage

func WithStorage(storage storage.Storage) func(*Bot)

Types

type Bot

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

func NewBot

func NewBot(options Options, tg *telegram.Client, src oauth2.TokenSource, opts ...func(*Bot)) *Bot

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

func (*Bot) SetupDispatcher

func (b *Bot) SetupDispatcher(dispatcher tg.UpdateDispatcher)

type Options

type Options struct {
	PollTimeout time.Duration
	Template    *template.Template
}

func (*Options) ParseTemplates

func (o *Options) ParseTemplates()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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