ctrl

package
v0.0.0-...-eca5cb0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ctrl contains all implementations of controllers to bots, to allow to run bots in several messengers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelegramBotCtrl

type TelegramBotCtrl struct {
	Token    string
	Bots     bot.Bot
	API      tbAPI
	UserName string
}

TelegramBotCtrl is an implementation of bot ctrl to execute bot commands in the Telegram messenger

func (*TelegramBotCtrl) Run

func (t *TelegramBotCtrl) Run(ctx context.Context) error

Run starts bots to listen for messages

func (*TelegramBotCtrl) SendBotResponse

func (t *TelegramBotCtrl) SendBotResponse(resp *bot.Response, chatIDStr string) error

SendBotResponse sends bot's answer to tg channel and saves it to log

Jump to

Keyboard shortcuts

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