bot

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot interface {
	// Send sends a message with text to chat with chatID passed as an argument
	Send(chatID int64, text string)
	// Updates returns a channel, which will be filled with events
	Updates() interface{}
}

Bot describes available bot functions

func GetBot

func GetBot(botType Type, token string) Bot

GetBot returns bot provider

func NewIcqBot

func NewIcqBot(token string) Bot

NewIcqBot returns new bot instance

func NewTelegramBot

func NewTelegramBot(token string) Bot

NewTelegramBot returns new bot instance

type Type

type Type int

Type bot provider type

const (
	// Telegram bot provider
	Telegram Type = iota
	// ICQ bot provider
	ICQ
)

Jump to

Keyboard shortcuts

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