add future

This commit is contained in:
SmileRex
2025-01-23 01:32:55 +03:00
parent e7573abcd0
commit ed8eb2431b
9 changed files with 301 additions and 107 deletions

12
main.go
View File

@@ -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()
}