@@ -29,7 +29,7 @@ SLACK_DSN=slack://xoxb-......@default?channel=fabien
29
29
Adding Interactions to a Message
30
30
--------------------------------
31
31
32
- With a Slack message, you can use the ` SlackOptions ` class to add some
32
+ With a Slack message, you can use the ` SlackOptions ` class to add some
33
33
interactive options called [ Block elements] ( https://api.slack.com/reference/block-kit/block-elements ) .
34
34
35
35
``` php
@@ -177,7 +177,7 @@ $chatter->send($chatMessage);
177
177
Sending a Message as a Reply
178
178
----------------------------
179
179
180
- To send your slack message as a reply in a thread use the ` threadTs() ` method.
180
+ To send your Slack message as a reply in a thread use the ` threadTs() ` method.
181
181
182
182
``` php
183
183
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackSectionBlock;
@@ -226,6 +226,23 @@ $options = new UpdateMessageSlackOptions($channelId, $messageId);
226
226
$chatter->send(new ChatMessage('Updated message', $options));
227
227
```
228
228
229
+ Scheduling a Slack Message
230
+ --------------------------
231
+
232
+ To schedule a message to be sent at a later time, use the ` postAt() ` method:
233
+
234
+ ``` php
235
+ use Symfony\Component\Notifier\Bridge\Slack\SlackOptions;
236
+ use Symfony\Component\Notifier\Message\ChatMessage;
237
+
238
+ $options = (new SlackOptions())->postAt(new \DateTime('+1 day'));
239
+
240
+ $chatMessage = new ChatMessage('Symfony Feature');
241
+ $chatMessage->options($options);
242
+
243
+ $chatter->send($chatMessage);
244
+ ```
245
+
229
246
Resources
230
247
---------
231
248
0 commit comments