!7 concept CLotteryResult { S date; L numbers; S jackpot; [stdToString] } standardBot1 LotteryBot { init { doEveryHourAndNow(r grabResults); } processSimplified { if "lottery results" { L l = sortedByFieldDesc date(list(CLotteryResult)); if (empty()) ret "No lottery results gathered yet"; S date1 = first(l).date; S text = mapToLines_rtrim(l, lambda1 renderResult); uploadFileInChannel(channelID, toUtf8(text), "lottery-" + date1 + ".txt", null, null); null; } } allServers { void grabResults enter { LotteryResults r = scrapeLotteryResults(); if (r == null) ret with print("No lottery results!?"); CLotteryResult lr = uniq(CLotteryResult, date := r.date); copyFields(r, lr); print("Grabbed: " + lr); } } }