mirror of
				https://github.com/watn3y/steamsalty.git
				synced 2025-11-04 03:00:51 +01:00 
			
		
		
		
	
		
			Some checks failed
		
		
	
	Build and Push to Docker Hub on changes to master branch / docker (push) Has been cancelled
				
			- added start command - added info command
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			491 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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]
 | 
						|
}
 |