3 namespace App\TwitchBotCommands;
5 use App\Models\TwitchBotCommand;
6 use App\TwitchBot\IRCMessage;
7 use App\TwitchBot\TwitchBot;
8 use React\Promise\Promise;
10 class ChatCommand extends BaseCommand {
12 public function __construct(TwitchBot $bot, TwitchBotCommand $cmd) {
13 parent::__construct($bot, $cmd);
16 public function execute() {
17 return new Promise(function($resolve) {
18 $this->bot->sendIRCMessage(IRCMessage::privmsg($this->getParameter('channel'), $this->getParameter('text')));