mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-10-26 02:01:03 +02:00
refactor!: change config structure to be more readable
This commit is contained in:
parent
f17601c470
commit
038d375ae7
7 changed files with 31 additions and 22 deletions
|
|
@ -1,13 +1,14 @@
|
|||
package botIO
|
||||
|
||||
import (
|
||||
"watn3y/steamsalty/config"
|
||||
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"github.com/rs/zerolog/log"
|
||||
"watn3y/steamsalty/config"
|
||||
)
|
||||
|
||||
func Authenticate() (tgbotapi.UpdatesChannel, *tgbotapi.BotAPI) {
|
||||
bot, err := tgbotapi.NewBotAPI(config.BotConfig.TelegramAPIToken)
|
||||
bot, err := tgbotapi.NewBotAPI(config.BotConfig.Telegram.APIToken)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to authenticate to Telegram")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue