telegrambee

package
v0.0.0-...-42619b2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2017 License: AGPL-3.0 Imports: 6 Imported by: 0

README

Telegram Bees

Telegram bot that sends and receives messages to/from Telegram chats and groups.

Configuration

Bee options:

"Bees": [{
    "Name": "telegram",
    "Class": "telegrambee",
    "Description": "Telegram bot bee",
    "Options": [{
        "Name": "apiKey",
        "Value": "file:///Users/lalotone/.telegramapi"
    }]
}]

apiKey: Telegram bot API Key. Can be added to the recipe, via environment variable (env://MY_API_KEY) or read from a file (file:///Users/lalotone/.telegram_key)

Credits

Telegram image by Telegram Messenger LLP - User:Javitomad, Public Domain, https://commons.wikimedia.org/w/index.php?curid=36861817

Documentation

Overview

Package telegrambee is a Bee that can connect to Telegram.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelegramBee

type TelegramBee struct {
	bees.Bee
	// contains filtered or unexported fields
}

TelegramBee is a Bee that can connect to Telegram.

func (*TelegramBee) Action

func (mod *TelegramBee) Action(action bees.Action) []bees.Placeholder

Action triggers the action passed to it.

func (*TelegramBee) ReloadOptions

func (mod *TelegramBee) ReloadOptions(options bees.BeeOptions)

ReloadOptions parses the config options and initializes the Bee.

func (*TelegramBee) Run

func (mod *TelegramBee) Run(eventChan chan bees.Event)

Run executes the Bee's event loop.

type TelegramBeeFactory

type TelegramBeeFactory struct {
	bees.BeeFactory
}

TelegramBeeFactory is a factory for TelegramBees.

func (*TelegramBeeFactory) Actions

func (factory *TelegramBeeFactory) Actions() []bees.ActionDescriptor

Actions describes the available actions provided by this Bee.

func (*TelegramBeeFactory) Description

func (factory *TelegramBeeFactory) Description() string

Description returns the description of this Bee.

func (*TelegramBeeFactory) Events

func (factory *TelegramBeeFactory) Events() []bees.EventDescriptor

Events describes the available events provided by this Bee.

func (*TelegramBeeFactory) ID

func (factory *TelegramBeeFactory) ID() string

ID returns the ID of this Bee.

func (*TelegramBeeFactory) Image

func (factory *TelegramBeeFactory) Image() string

Image returns the filename of an image for this Bee.

func (*TelegramBeeFactory) LogoColor

func (factory *TelegramBeeFactory) LogoColor() string

LogoColor returns the preferred logo background color (used by the admin interface).

func (*TelegramBeeFactory) Name

func (factory *TelegramBeeFactory) Name() string

Name returns the name of this Bee.

func (*TelegramBeeFactory) New

func (factory *TelegramBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface

New returns a new Bee instance configured with the supplied options.

func (*TelegramBeeFactory) Options

func (factory *TelegramBeeFactory) Options() []bees.BeeOptionDescriptor

Options returns the options available to configure this Bee.

Jump to

Keyboard shortcuts

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