# Discord Bot Poster (`alizarin_refrigerator-owner/discord-poster`) Actor

Send automated messages to Discord servers using your bot token. Perfect for announcements, scheduled posts, community updates, and marketing automation. Simple Messages, Rich Embeds, Multi-Channel, Mentions, Batch Messaging &
Validation Mode

- **URL**: https://apify.com/alizarin_refrigerator-owner/discord-poster.md
- **Developed by:** [The Howlers](https://apify.com/alizarin_refrigerator-owner) (community)
- **Categories:** Automation, Social media, Other
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Discord Bot Poster - Send Messages to Discord Channels

Send automated messages to Discord channels using your bot token. Supports plain text, rich embeds with images and custom colors, multi-channel posting, role/user mentions, batch messaging, and validation mode to check bot permissions before posting.

**BYOK (Bring Your Own Key)** -- you provide your own API credentials.

***

### Before You Start

This actor requires your own API credentials to fetch real data.

**Where to get your key:** Your Discord bot token from the Discord Developer Portal. Create one at https://discord.com/developers/applications

***

### Quick Start

#### Run with real data

```json
{
  "botToken": "YOUR_API_KEY_HERE",
  "embedColor": "#5865F2",
  "embedUrl": "https://example.com",
  "embedImageUrl": "https://example.com",
  "embedThumbnailUrl": "https://example.com",
  "mentionEveryone": false,
  "suppressEmbeds": false,
  "tts": false,
  "validateOnly": false,
  "utmTracking": {
    "enabled": true
  }
}
```

***

### Input Parameters

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `botToken` | string | - | Yes\* | Your Discord bot token from the Discord Developer Portal. Create one at https://discord.com/developers/applications |
| `channelId` | string | - | No | The Discord channel ID to post to. Right-click the channel and select 'Copy Channel ID' (requires Developer Mode enabled) |
| `channelIds` | array | - | No | Post to multiple channels at once. One channel ID per line. |
| `message` | string | - | No | The text message to send. Supports Discord markdown formatting. |
| `messages` | array | - | No | Send multiple messages in sequence. Each message on a new line. |
| `embedTitle` | string | - | No | Title for a rich embed message (optional) |
| `embedDescription` | string | - | No | Description text for the embed (optional) |
| `embedColor` | string | `"#5865F2"` | No | Hex color for the embed sidebar (e.g., #FF5733) |
| `embedUrl` | string | - | No | URL that the embed title links to |
| `embedImageUrl` | string | - | No | URL of an image to display in the embed |
| `embedThumbnailUrl` | string | - | No | URL of a thumbnail image for the embed |
| `embedFooter` | string | - | No | Footer text for the embed |
| `embedFields` | array | - | No | Additional fields for the embed. Format: name/value/inline (one per line) |
| `mentionRoles` | array | - | No | Role IDs to mention in the message (will ping users with these roles) |
| `mentionUsers` | array | - | No | User IDs to mention in the message |
| `mentionEveryone` | boolean | `false` | No | Include @everyone mention (requires permission) |
| `suppressEmbeds` | boolean | `false` | No | Prevent URLs in the message from generating preview embeds |
| `tts` | boolean | `false` | No | Send as a TTS (text-to-speech) message |
| `validateOnly` | boolean | `false` | No | Only validate bot access to channels without sending messages |
| `webhookUrl` | string | - | No | URL to receive a POST request when the actor run finishes. Useful for integrations with Zapier, Make, n8n, or custom automation workflows. |
| `utmTracking` | object | `{"enabled":true}` | No | Enable UTM tracking parameters on embed URLs for analytics. Default: { enabled: true } - will auto-add utm_source=discord, utm_medium=social, utm_campaign=discord_post_YYYYMMDD |

***

### Pricing

This actor uses **pay-per-event** billing:

| Event | Description | Price |
|-------|-------------|-------|
| Message Sent | Charged per message successfully sent to a Discord channel | $0.01 |
| Rich Embed Sent | Charged per rich embed message with custom formatting | $0.01 |
| Channel Validated | Charged per channel access validation check | $0.01 |

***

### Troubleshooting

#### "API key is required"

- Add your API key in the input

#### "API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

#### "API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

#### No results or empty dataset

Check the run log for error messages. Common causes:

- Invalid input format (check the examples above)
- API key without proper permissions
- The target data doesn't exist or is too small to track

#### How do I test without an API key?

Run the actor without a bot token, or set demoMode to true, and it returns labeled sample post results in the exact format of a live run. No real Discord messages are posted, every sample item carries demo: true and a \_notice field, and sample runs charge no task events. Provide your own bot token to post for real.

***

**Built by John Rippy | [Actor Arsenal](https://actorarsenal.com)**

# Actor input Schema

## `botToken` (type: `string`):

Your Discord bot token from the Discord Developer Portal. Create one at https://discord.com/developers/applications

## `channelId` (type: `string`):

The Discord channel ID to post to. Right-click the channel and select 'Copy Channel ID' (requires Developer Mode enabled)

## `channelIds` (type: `array`):

Post to multiple channels at once. One channel ID per line.

## `message` (type: `string`):

The text message to send. Supports Discord markdown formatting.

## `messages` (type: `array`):

Send multiple messages in sequence. Each message on a new line.

## `embedTitle` (type: `string`):

Title for a rich embed message (optional)

## `embedDescription` (type: `string`):

Description text for the embed (optional)

## `embedColor` (type: `string`):

Hex color for the embed sidebar (e.g., #FF5733)

## `embedUrl` (type: `string`):

URL that the embed title links to

## `embedImageUrl` (type: `string`):

URL of an image to display in the embed

## `embedThumbnailUrl` (type: `string`):

URL of a thumbnail image for the embed

## `embedFooter` (type: `string`):

Footer text for the embed

## `embedFields` (type: `array`):

Additional fields for the embed. Format: name|value|inline (one per line)

## `mentionRoles` (type: `array`):

Role IDs to mention in the message (will ping users with these roles)

## `mentionUsers` (type: `array`):

User IDs to mention in the message

## `mentionEveryone` (type: `boolean`):

Include @everyone mention (requires permission)

## `suppressEmbeds` (type: `boolean`):

Prevent URLs in the message from generating preview embeds

## `tts` (type: `boolean`):

Send as a TTS (text-to-speech) message

## `validateOnly` (type: `boolean`):

Only validate bot access to channels without sending messages

## `demoMode` (type: `boolean`):

Run with sample data to test the actor without a bot token

## `webhookUrl` (type: `string`):

URL to receive a POST request when the actor run finishes. Useful for integrations with Zapier, Make, n8n, or custom automation workflows.

## `utmTracking` (type: `object`):

Enable UTM tracking parameters on embed URLs for analytics. Default: { enabled: true } - will auto-add utm_source=discord, utm_medium=social, utm_campaign=discord_post_YYYYMMDD

## Actor input object example

```json
{
  "embedColor": "#5865F2",
  "mentionEveryone": false,
  "suppressEmbeds": false,
  "tts": false,
  "validateOnly": false,
  "demoMode": false,
  "utmTracking": {
    "enabled": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Results from posting messages to Discord channels via bot or webhook.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "demoMode": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("alizarin_refrigerator-owner/discord-poster").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "demoMode": False }

# Run the Actor and wait for it to finish
run = client.actor("alizarin_refrigerator-owner/discord-poster").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "demoMode": false
}' |
apify call alizarin_refrigerator-owner/discord-poster --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alizarin_refrigerator-owner/discord-poster"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bVNeUlC7fWcJGZdp8/builds/iQvMzmhqb8fp5sVej/openapi.json
