->inRandomOrder();
}
+ private function randomChat(Channel $channel) {
+ $line = $this->queryChatlog($channel)
+ ->whereIn('classification', ['hi', 'hype', 'lol', 'pog', 'unclassified'])
+ ->first();
+ return $line->text_content;
+ }
+
private function randomContextualNumber(Channel $channel) {
$notes = $this->getNotes($channel);
$min = 100000;
$this->getNotes($channel);
$this->notes[$channel->id]['last_read'] = time();
++$this->notes[$channel->id]['read_since_last_write'];
- $this->notes[$channel->id]['latest_msgs'][] = $msg->getText();
- if (count($this->notes[$channel->id]['latest_msgs']) > 10) {
- array_shift($this->notes[$channel->id]['latest_msgs']);
+ if (!$msg->isKnownBot() && !$msg->scanForSpam()) {
+ $this->notes[$channel->id]['latest_msgs'][] = $msg->getText();
+ if (count($this->notes[$channel->id]['latest_msgs']) > 10) {
+ array_shift($this->notes[$channel->id]['latest_msgs']);
+ }
}
}