Warning: session_start(): open(/var/lib/php/sessions/sess_rmr241en1ejc757opcgr2e0agn, 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 Msg {
long msgID, channelID, userID;
long date, edited; // epochSeconds
S text;
}
concept Question {
Msg msg;
Answer acceptedAnswer;
}
concept Answer {
Msg msg;
Question question;
}
standardBot1 Asker {
init { dbIndexing(Msg, 'msgID); }
allServers {
!include #1025906 // DiscordScanner
}
processSimplified {
optPar Message msg;
optPar long channelID;
optPar long userID;
storeMsg(msg);
if null (s = dropMyPrefixOrNull(s)) null;
if "ask me something" {
S q = "Is " + random(100) + " bigger than " + random(100) + "?";
postInChannel(channelID, discordAt(userID) + " " + q, mm -> {
Msg stored = pairA(storeMsg(m));
printStruct("New question: " + cnew Question(msg := stored));
});
null;
}
}
}