mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-04-20 00:11:23 +02:00
- Fixed SLEEPTIME not working (always 0) - Refined logging - Added metadata to /info command - Bot now automatically sets own commands for autocompletion
18 lines
478 B
Go
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]
|
|
}
|