Skip to content

Commit

Permalink
fix silly bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzydragon committed Mar 22, 2021
1 parent dff5d0c commit 946f5a2
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/Main.go
Expand Up @@ -13,6 +13,7 @@ import (

var (
placeId string
reset = false
)

type MarketPlaceInfo struct { // https://mholt.github.io/json-to-go/
Expand Down Expand Up @@ -59,8 +60,23 @@ func UpdateRobloxPresence() {

for (roblox == nil) {
roblox = GetProcessByName("RobloxPlayerBeta.exe")

if (reset == false) {
reset = true

client.Logout()
fmt.Println("reset client activity")
}
}

err := client.Login("823294557155754005")

if (err != nil) {
fmt.Println(err)
}

reset = false

args, _ := roblox.Cmdline()

placePattern := regexp.MustCompile(`placeId=(\d+)`)
Expand Down Expand Up @@ -99,11 +115,9 @@ func UpdateRobloxPresence() {
}

func main() {
client.Login("823294557155754005")

for (true) {
UpdateRobloxPresence()

time.Sleep(time.Second * 10)
time.Sleep(time.Second * 5)
}
}

0 comments on commit 946f5a2

Please sign in to comment.