mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-06-07 15:21:00 +02:00
v0.3
Some checks failed
Build and Push to Docker Hub on changes to master branch / docker (push) Has been cancelled
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
This commit is contained in:
parent
9c64a3e4b5
commit
453f03d832
5 changed files with 98 additions and 7 deletions
|
@ -1,12 +1,13 @@
|
|||
package steam
|
||||
|
||||
import (
|
||||
"watn3y/steamsalty/config"
|
||||
|
||||
"github.com/Philipp15b/go-steamapi"
|
||||
"github.com/rs/zerolog/log"
|
||||
"watn3y/steamsalty/config"
|
||||
)
|
||||
|
||||
func getPlayerDetails(steamID uint64) (summary steamapi.PlayerSummary) {
|
||||
func GetPlayerDetails(steamID uint64) (summary steamapi.PlayerSummary) {
|
||||
|
||||
response, err := steamapi.GetPlayerSummaries([]uint64{steamID}, config.BotConfig.SteamAPIKey)
|
||||
if err != nil {
|
||||
|
|
|
@ -46,14 +46,14 @@ func watcher(bot *tgbotapi.BotAPI, steamID uint64) {
|
|||
}
|
||||
|
||||
if strings.Contains(currentCommentsPage.CommentsHTML, steamContentCheckText) {
|
||||
log.Info().Uint64("ProfileID", steamID).Msg("Found new comment(s) still being checked by Steam, retrying in "+ sleeptime.String())
|
||||
log.Info().Uint64("ProfileID", steamID).Msg("Found new comment(s) still being checked by Steam, retrying in " + sleeptime.String())
|
||||
time.Sleep(sleeptime)
|
||||
continue
|
||||
}
|
||||
|
||||
log.Info().Uint64("ProfileID", steamID).Msg("Found new comment(s)")
|
||||
|
||||
profileOwner := getPlayerDetails(steamID)
|
||||
profileOwner := GetPlayerDetails(steamID)
|
||||
|
||||
for _, comment := range parseComments(currentCommentsPage) {
|
||||
log.Debug().Interface("Comment", comment).Msg("Processing Comment")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue