steamsalty/steam/api.go
Noah Theus 6be403fc58 v1.0
- Fixed SLEEPTIME not working (always 0)
- Refined logging
- Added metadata to /info command
- Bot now automatically sets own commands for autocompletion
2024-12-22 07:28:00 +01:00

18 lines
478 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("Got PlayerSummary from Steam API")
return response[0]
}