feat: Added telegram message sending
This commit is contained in:
@ -1,12 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"git.inkling.su/mrqiz/schedule-poll/internal/config"
|
||||
"git.inkling.su/mrqiz/schedule-poll/internal/schedule"
|
||||
"git.inkling.su/mrqiz/schedule-poll/internal/telegram"
|
||||
"github.com/robfig/cron/v3"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := telegram.GetMe()
|
||||
|
||||
if err != nil {
|
||||
log.Fatalln("Unable to connect to telegram", err)
|
||||
}
|
||||
|
||||
c := cron.New(cron.WithSeconds())
|
||||
c.AddFunc(config.AppConfig.CronPattern, schedule.PollSchedule)
|
||||
c.Run()
|
||||
|
||||
Reference in New Issue
Block a user