This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-10-04 17:56:18 +04:00
|
|
|
|
// i2_bot – Instinct PokememBro Bot
|
|
|
|
|
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
|
|
|
|
|
|
|
|
|
|
package router
|
|
|
|
|
|
|
|
|
|
import (
|
2017-10-18 07:03:34 +04:00
|
|
|
|
// 3rd party
|
2017-10-07 19:58:14 +04:00
|
|
|
|
"github.com/go-telegram-bot-api/telegram-bot-api"
|
2017-10-04 17:56:18 +04:00
|
|
|
|
)
|
|
|
|
|
|
2017-10-18 09:39:50 +04:00
|
|
|
|
// RouterHandler is a handler for router package
|
2017-10-18 07:03:34 +04:00
|
|
|
|
type RouterHandler struct{}
|
2017-10-04 17:56:18 +04:00
|
|
|
|
|
2017-10-18 09:39:50 +04:00
|
|
|
|
// Init is an initialization function of router
|
2017-10-04 17:56:18 +04:00
|
|
|
|
func (rh RouterHandler) Init() {
|
2017-10-18 07:03:34 +04:00
|
|
|
|
r.Init()
|
2017-10-04 17:56:18 +04:00
|
|
|
|
}
|
|
|
|
|
|
2017-10-18 09:39:50 +04:00
|
|
|
|
// RouteRequest decides, what to do with user input
|
2017-10-04 17:56:18 +04:00
|
|
|
|
func (rh RouterHandler) RouteRequest(update tgbotapi.Update) string {
|
2017-10-18 07:03:34 +04:00
|
|
|
|
return r.RouteRequest(update)
|
2017-10-04 17:56:18 +04:00
|
|
|
|
}
|