add future
This commit is contained in:
12
main.go
12
main.go
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bot/src/controllers"
|
||||
"bot/src/handlers"
|
||||
"log"
|
||||
"time"
|
||||
@@ -9,9 +10,6 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
dataHandler := handlers.Data{}
|
||||
dataHandler.InitDB()
|
||||
|
||||
pref := tele.Settings{
|
||||
Token: "7757765456:AAFpFXhbi9XCfgRt7P3OT3F_jrBBplubWZA",
|
||||
Poller: &tele.LongPoller{Timeout: 10 * time.Second},
|
||||
@@ -23,9 +21,15 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
dc := controllers.NewDB()
|
||||
dataHandler := handlers.NewHandlers(dc)
|
||||
duelController := controllers.NewDuel(b, dc)
|
||||
|
||||
b.Handle("/dick", dataHandler.Dick)
|
||||
b.Handle("/top_dick", dataHandler.TopDick)
|
||||
b.Handle("/clear_stats", dataHandler.ClearStatistics)
|
||||
|
||||
b.Handle("/duel", duelController.StartMatch)
|
||||
b.Handle("/accept", duelController.AcceptMatch)
|
||||
|
||||
b.Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user