Warning: session_start(): open(/var/lib/php/sessions/sess_u8gm9r1abf4km333uebd4gdi9l, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
concept CLotteryResult {
S date;
L numbers;
S jackpot;
[stdToString]
}
standardBot1 LotteryBot {
init {
dbIndexing(CLotteryResult, 'date);
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);
}
}
}