feat: Added telegram message sending
This commit is contained in:
@ -8,8 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type config struct {
|
||||
TelegramBotToken string
|
||||
Schedule struct {
|
||||
Telegram struct {
|
||||
Token string
|
||||
ChatId string
|
||||
}
|
||||
Schedule struct {
|
||||
BaseUrl string
|
||||
FacultyId string
|
||||
GroupId string
|
||||
@ -32,6 +35,7 @@ func init() {
|
||||
AppConfig.Schedule.FacultyId = os.Getenv("SCHEDULE_FACULTY_ID")
|
||||
AppConfig.Schedule.GroupId = os.Getenv("SCHEDULE_GROUP_ID")
|
||||
AppConfig.Schedule.StartDate = os.Getenv("SCHEDULE_START_DATE")
|
||||
AppConfig.TelegramBotToken = os.Getenv("SCHEDULE_TELEGRAM_TOKEN")
|
||||
AppConfig.Telegram.Token = os.Getenv("SCHEDULE_TELEGRAM_TOKEN")
|
||||
AppConfig.Telegram.ChatId = os.Getenv("SCHEDULE_TELEGRAM_CHAT_ID")
|
||||
AppConfig.CronPattern = os.Getenv("SCHEDULE_CRON_PATTERN")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user