various improvements

This commit is contained in:
watn3y 2023-12-29 02:35:22 +01:00
parent d5272262da
commit 1a6953900c
14 changed files with 71 additions and 49 deletions

View file

@ -1,12 +1,18 @@
package botIO
import tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
import (
"github.com/rs/zerolog/log"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
func GetUserByID(userToGet tgbotapi.ChatConfigWithUser, bot *tgbotapi.BotAPI) (error bool, member tgbotapi.ChatMember) {
member, err := bot.GetChatMember(tgbotapi.GetChatMemberConfig{ChatConfigWithUser: userToGet})
if err != nil {
log.Error().Err(err).Msg("Unable to get info for user")
return true, member
}
log.Debug().Interface("member",member).Msg("Got Info for user")
return false, member
}