| @@ 39-47 (lines=9) @@ | ||
| 36 | * @param Attachment $attachment |
|
| 37 | * @param int $delay |
|
| 38 | */ |
|
| 39 | protected function sendAttachment(Attachment $attachment, int $delay = 0): void |
|
| 40 | { |
|
| 41 | SendAttachment::dispatch( |
|
| 42 | context()->getChannel(), |
|
| 43 | context()->getChat(), |
|
| 44 | context()->getUser(), |
|
| 45 | $attachment |
|
| 46 | )->delay($delay); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Send request to the messaging service. |
|
| @@ 56-65 (lines=10) @@ | ||
| 53 | * @param array $parameters |
|
| 54 | * @param int $delay |
|
| 55 | */ |
|
| 56 | protected function sendRequest(string $endpoint, array $parameters = [], int $delay = 0): void |
|
| 57 | { |
|
| 58 | SendRequest::dispatch( |
|
| 59 | context()->getChannel(), |
|
| 60 | context()->getChat(), |
|
| 61 | context()->getUser(), |
|
| 62 | $endpoint, |
|
| 63 | $parameters |
|
| 64 | )->delay($delay); |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||