This commit is contained in:
Noah 2024-12-20 02:09:07 +01:00
parent 0c9b98cab4
commit 8fecdee6b8
No known key found for this signature in database
GPG key ID: D2A7E2C8F77E0430
16 changed files with 408 additions and 1 deletions

17
steam/api.go Normal file
View file

@ -0,0 +1,17 @@
package steam
import (
"github.com/Philipp15b/go-steamapi"
"github.com/rs/zerolog/log"
"watn3y/steamsalty/config"
)
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")
}
return response[0]
}