X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBotCommands%2FAdlibChatCommand.php;fp=app%2FTwitchBotCommands%2FAdlibChatCommand.php;h=8079b8c6b33c432e216d380dbfc061005d59c7b0;hb=f0d1a566f5afd76ab7a56b295b71d5756dfd2bc3;hp=0000000000000000000000000000000000000000;hpb=a45648fa8ecf7712c7fd00eb2b93e862b5264f04;p=alttp.git diff --git a/app/TwitchBotCommands/AdlibChatCommand.php b/app/TwitchBotCommands/AdlibChatCommand.php new file mode 100644 index 0000000..8079b8c --- /dev/null +++ b/app/TwitchBotCommands/AdlibChatCommand.php @@ -0,0 +1,34 @@ +getParameter('channel')); + $db = $this->bot->getChatlibDatabase($channel); + $text = $db->generate(); + $this->bot->sendIRCMessage(IRCMessage::privmsg($channel->twitch_chat, $text)); + $log = new ChatBotLog(); + $log->channel()->associate($channel); + $log->text = $text; + $log->user()->associate($this->getExecutingUser()); + $log->category = 'adlib'; + $log->save(); + $resolve(); + }); + } + +}