chatbottelegram

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TelegramToken  string
	Token          string
	ServAddr       string
	Username       string
	PreviewWebPage bool
	LogLevel       string
}

Config - configuate

func LoadConfig

func LoadConfig(filename string) (*Config, error)

LoadConfig - load config

type Serv

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

Serv - serv

func NewServ

func NewServ(cfg *Config) (*Serv, error)

NewServ - new a service

func (*Serv) ForwardMsg added in v0.5.42

func (serv *Serv) ForwardMsg(ctx context.Context, chat *chatbotpb.ChatMsg) error

ForwardMsg - forward a chat message

func (*Serv) SendChatMsg

func (serv *Serv) SendChatMsg(ctx context.Context, chat *chatbotpb.ChatMsg) error

SendChatMsg - send a chat message

func (*Serv) Start

func (serv *Serv) Start(ctx context.Context) error

Start - start telegram bot

Jump to

Keyboard shortcuts

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