Restructures configuration for birthdays and adds pictures directory
This commit is contained in:
parent
c7399eb9da
commit
ec2cdfdeaa
9 changed files with 55 additions and 31 deletions
|
@ -13,12 +13,12 @@ import (
|
|||
|
||||
type TelegramNotificationService struct {
|
||||
logger *log.Logger
|
||||
config *model.TelegramNotificationsConfig
|
||||
config *model.Config
|
||||
bot *tgbotapi.BotAPI
|
||||
}
|
||||
|
||||
func NewTelegramNotificationService(logger *log.Logger, config *model.TelegramNotificationsConfig) (*TelegramNotificationService, error) {
|
||||
bot, err := tgbotapi.NewBotAPI(config.BotToken)
|
||||
func NewTelegramNotificationService(logger *log.Logger, config *model.Config) (*TelegramNotificationService, error) {
|
||||
bot, err := tgbotapi.NewBotAPI(config.TelegramNotifications.BotToken)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create bot: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue