handlers

package
v0.0.0-...-bf623a6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoKick

func AutoKick(update *tgbotapi.Update, bot *tgbotapi.BotAPI, config *config.TomlConfig)

func LoadTorrent

func LoadTorrent(update *tgbotapi.Update, bot *tgbotapi.BotAPI, replyHandler *ReplyIdHandler, config *config.TomlConfig)

Types

type MessageCallbackFunction

type MessageCallbackFunction func(update *tgbotapi.Update, bot *tgbotapi.BotAPI)

Function callback type declaration

type MessageReplyCall

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

Struct containing the original message Id and a callback to be executed

type ReplyIdHandler

type ReplyIdHandler struct {
	Callbacks []MessageReplyCall
}

func (*ReplyIdHandler) Add

func (handler *ReplyIdHandler) Add(messageId int, callaback MessageCallbackFunction)

Register a callback to be executed when arrives a message with ID messageId

func (*ReplyIdHandler) Process

func (handler *ReplyIdHandler) Process(update *tgbotapi.Update, bot *tgbotapi.BotAPI)

Execute the callbacks registered on messageReplyCallRegister

Jump to

Keyboard shortcuts

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