getParameter('channel')); $text = $channel->randomOfClass($this->getParameter('category')); $this->bot->sendIRCMessage(IRCMessage::privmsg($channel->twitch_chat, $text->text_content)); $log = new ChatBotLog(); $log->channel()->associate($channel); if (is_object($text)) { $log->origin()->associate($text); } $log->text = $text->text_content; $log->save(); $resolve(); }); } }