mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-04-19 16:01:22 +02:00
- Include comment text in notification - Include commenter in notification - Use Timestamp to check if a comment is new - Set sleep interval between requests in env variable
17 lines
490 B
Go
17 lines
490 B
Go
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")
|
|
}
|
|
log.Debug().Interface("Player", response[0]).Msg("Successfully got PlayerSummary from Steam API")
|
|
return response[0]
|
|
}
|