+ private function listenCommands() {
+ $this->getLoop()->addPeriodicTimer(1, function () {
+ if (!$this->ready) return;
+ $command = TwitchBotCommand::where('status', '=', 'pending')->oldest()->first();
+ if ($command) {
+ try {
+ $command->execute($this);
+ } catch (\Exception $e) {
+ }
+ }
+ });
+
+ }
+