A Discord bot, made with Gleam, designed to help manage a pixel art server.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

potentially keep the bot online

Isaac b8d10b79 1ec50512

+3 -4
+3 -4
src/pablo_pixarto.gleam
··· 58 58 Ok(_) -> { 59 59 logging.log(logging.Info, "Started the gateway!") 60 60 61 - let state = check_and_post(state) 62 61 process.spawn(fn() { schedule_check(state) }) 63 62 process.sleep_forever() 64 63 } ··· 105 104 } 106 105 107 106 fn schedule_check(state: AppState) -> Nil { 107 + // Check for new posts first 108 + let new_state = check_and_post(state) 109 + 108 110 // Sleep for the interval 109 111 process.sleep(check_interval_ms) 110 - 111 - // Check for new posts 112 - let new_state = check_and_post(state) 113 112 114 113 // Schedule next check 115 114 schedule_check(new_state)