FoPost LogoFoPost Docs
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:

  1. Go to Project Settings > Platforms > Discord
  2. Enter your bot token and target channel ID
  3. Click Connect

Webhook mode:

  1. In your Discord server, go to Channel Settings > Integrations > Webhooks
  2. Create a webhook and copy the URL
  3. Paste the webhook URL in the OwlStack dashboard

Publishing

use OwlStack\Enums\Platform;

$result = $client->publish($post, [Platform::Discord]);

Options

OptionTypeDescription
embedboolUse rich embed format
colorintEmbed color (hex)
thread_idstringSend to a thread
ttsboolText-to-speech
$result = $client->publish($post, [Platform::Discord], [
    'embed' => true,
    'color' => 0x5865F2,
    'thread_id' => '...',
]);

Constraints

ConstraintValue
Max text length2,000 characters
Max media10
Supported media typesJPEG, PNG, GIF, WebP, MP4
Formatter markupMarkdown

On this page