steamsalty/steam/api.go
Noah Theus 453f03d832
Some checks failed
Build and Push to Docker Hub on changes to master branch / docker (push) Has been cancelled
v0.3
- added start command
- added info command
2024-12-21 08:28:28 +01:00

18 lines
491 B
Go

package steam
import (
"watn3y/steamsalty/config"
"github.com/Philipp15b/go-steamapi"
"github.com/rs/zerolog/log"
)
func GetPlayerDetails(steamID uint64) (summary steamapi.PlayerSummary) {
response, err := steamapi.GetPlayerSummaries([]uint64{steamID}, config.BotConfig.SteamAPIKey)
if err != nil {
log.Error().Err(err).Msg("Failed to get Player Summary")
}
log.Debug().Interface("Player", response[0]).Msg("Successfully got PlayerSummary from Steam API")
return response[0]
}