-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New events and code cleanup. Improved test coverage.
- Loading branch information
Showing
8 changed files
with
485 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace RTippin\Messenger\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
use RTippin\Messenger\Models\BotAction; | ||
use Throwable; | ||
|
||
class BotActionFailedEvent | ||
{ | ||
use SerializesModels; | ||
|
||
/** | ||
* @var BotAction | ||
*/ | ||
public BotAction $action; | ||
|
||
/** | ||
* @var Throwable | ||
*/ | ||
public Throwable $exception; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param BotAction $action | ||
* @param Throwable $exception | ||
*/ | ||
public function __construct(BotAction $action, Throwable $exception) | ||
{ | ||
$this->action = $action; | ||
$this->exception = $exception; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace RTippin\Messenger\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
use RTippin\Messenger\Models\BotAction; | ||
use RTippin\Messenger\Models\Message; | ||
|
||
class BotActionHandledEvent | ||
{ | ||
use SerializesModels; | ||
|
||
/** | ||
* @var BotAction | ||
*/ | ||
public BotAction $action; | ||
|
||
/** | ||
* @var Message | ||
*/ | ||
public Message $message; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public string $trigger; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param BotAction $action | ||
* @param Message $message | ||
* @param string $trigger | ||
*/ | ||
public function __construct(BotAction $action, | ||
Message $message, | ||
string $trigger) | ||
{ | ||
$this->action = $action; | ||
$this->message = $message; | ||
$this->trigger = $trigger; | ||
} | ||
} |
Oops, something went wrong.