package main import ( "bot/src/controllers" "bot/src/handlers" "log" "time" tele "gopkg.in/telebot.v4" ) var yourToken = "7757765456:AAFpFXhbi9XCfgRt7P3OT3F_jrBBplubWZA" func main() { pref := tele.Settings{ Token: yourToken, Poller: &tele.LongPoller{Timeout: 10 * time.Second}, } b, err := tele.NewBot(pref) if err != nil { log.Fatal(err) 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("/duel", duelController.StartMatch) b.Handle("/accept", duelController.AcceptMatch) b.Start() }