]> git.localhorst.tv Git - alttp.git/blob - app/TwitchBotCommands/PartCommand.php
switch SNES default port
[alttp.git] / app / TwitchBotCommands / PartCommand.php
1 <?php
2
3 namespace App\TwitchBotCommands;
4
5 use App\Models\TwitchBotCommand;
6 use App\TwitchBot\IRCMessage;
7 use App\TwitchBot\TwitchBot;
8 use React\Promise\Promise;
9
10 class PartCommand extends BaseCommand {
11
12         public function __construct(TwitchBot $bot, TwitchBotCommand $cmd) {
13                 parent::__construct($bot, $cmd);
14         }
15
16         public function execute() {
17                 return new Promise(function($resolve) {
18                         $this->bot->sendIRCMessage(IRCMessage::part([$this->getParameter('channel')]));
19                         $resolve();
20                 });
21         }
22
23 }