mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-06-07 07:11:01 +02:00
v1.0
- Fixed SLEEPTIME not working (always 0) - Refined logging - Added metadata to /info command - Bot now automatically sets own commands for autocompletion
This commit is contained in:
parent
eb0482b8e0
commit
6be403fc58
14 changed files with 116 additions and 53 deletions
|
@ -12,12 +12,15 @@ func Authenticate() (tgbotapi.UpdatesChannel, *tgbotapi.BotAPI) {
|
|||
log.Panic().Err(err).Msg("Failed to authenticate")
|
||||
}
|
||||
|
||||
bot.Debug = config.BotConfig.DebugMode
|
||||
bot.Debug = false
|
||||
if config.BotConfig.LogLevel == -1 {
|
||||
bot.Debug = true
|
||||
}
|
||||
|
||||
updates := tgbotapi.NewUpdate(0)
|
||||
updates.Timeout = 60
|
||||
|
||||
log.Info().Int64("ID", bot.Self.ID).Str("username", bot.Self.UserName).Msg("Successfully authenticated to Telegram API")
|
||||
log.Info().Int64("ID", bot.Self.ID).Str("username", bot.Self.UserName).Msg("Authenticated to Telegram API")
|
||||
|
||||
return bot.GetUpdatesChan(updates), bot
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue