-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.go
More file actions
23 lines (17 loc) · 1.07 KB
/
Copy pathroutes.go
File metadata and controls
23 lines (17 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main
import (
"github.com/go-telegram/bot"
"github.com/santuchoagus/brobot/handlers"
)
var prefix = "bro"
func RegisterRoutes(b *bot.Bot) {
// TODO: Esto es un asco pero funciona por ahora, habria que guardarlo en una DB o un json.
b.RegisterHandler(bot.HandlerTypeMessageText, "/plan", bot.MatchTypePrefix, handlers.HandlePlan)
b.RegisterHandler(bot.HandlerTypeMessageText, prefix+" plan", bot.MatchTypePrefix, handlers.HandlePlan)
b.RegisterHandler(bot.HandlerTypeMessageText, prefix+" flan", bot.MatchTypePrefix, handlers.HandleFlan)
b.RegisterHandler(bot.HandlerTypeMessageText, "/links", bot.MatchTypePrefix, handlers.HandleLinks)
b.RegisterHandler(bot.HandlerTypeMessageText, prefix+" links", bot.MatchTypePrefix, handlers.HandleLinks)
b.RegisterHandler(bot.HandlerTypeMessageText, "/contribuir", bot.MatchTypePrefix, handlers.HandleContribuir)
b.RegisterHandler(bot.HandlerTypeMessageText, prefix+" contribuir", bot.MatchTypePrefix, handlers.HandleContribuir)
b.RegisterHandler(bot.HandlerTypeMessageText, "/materias", bot.MatchTypePrefix, handlers.HandleMaterias)
}