- private function queryChatlog(Channel $channel) {
- return ChatLog::where('type', '=', 'chat')
- ->where('banned', '=', false)
- ->where('created_at', '<', now()->sub(1, 'day'))
- ->where(function ($query) use ($channel) {
- $query->whereNull('detected_language');
- $query->orWhereIn('detected_language', $channel->languages);
- })
- ->inRandomOrder();
+ private function randomChat(Channel $channel) {
+ $line = $channel->queryChatlog()
+ ->whereIn('classification', ['hi', 'hype', 'lol', 'pog', 'unclassified'])
+ ->first();
+ return $line->text_content;