Platforms
Discord
Publishing to Discord channels via bot or webhook.
Discord
Discord supports two modes - bot and webhook - with rich embed support.
Connect
Connect Discord in the OwlStack dashboard:
Bot mode:
- Go to Project Settings > Platforms > Discord
- Enter your bot token and target channel ID
- Click Connect
Webhook mode:
- In your Discord server, go to Channel Settings > Integrations > Webhooks
- Create a webhook and copy the URL
- Paste the webhook URL in the OwlStack dashboard
Publishing
use OwlStack\Enums\Platform;
$result = $client->publish($post, [Platform::Discord]);Options
| Option | Type | Description |
|---|---|---|
embed | bool | Use rich embed format |
color | int | Embed color (hex) |
thread_id | string | Send to a thread |
tts | bool | Text-to-speech |
$result = $client->publish($post, [Platform::Discord], [
'embed' => true,
'color' => 0x5865F2,
'thread_id' => '...',
]);Constraints
| Constraint | Value |
|---|---|
| Max text length | 2,000 characters |
| Max media | 10 |
| Supported media types | JPEG, PNG, GIF, WebP, MP4 |
| Formatter markup | Markdown |