Home/Tools/@tpmjs/discord-post

discordPostTool

@tpmjs/discord-post

Post a message or rich embed to a Discord channel. Supports plain text messages and formatted embeds with titles, descriptions, colors, and fields.

Official
communication
v0.2.0
MIT

Interactive Playground

Test @tpmjs/discord-post (discordPostTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/discord-post
pnpm add @tpmjs/discord-post
yarn add @tpmjs/discord-post
bun add @tpmjs/discord-post
deno add npm:@tpmjs/discord-post

2. Import the tool

import { discordPostTool } from '@tpmjs/discord-post';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { discordPostTool } from '@tpmjs/discord-post';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { discordPostTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

Auto-extracted
channelId
Required
Type: string

Discord channel ID to post to

content
Optional
Type: string

Plain text message content (max 2000 characters)

embed
Optional
Type: object

Rich embed object for formatted messages

Schema extracted: 1/15/2026, 3:45:44 AM

README

ERROR: No README data found!

Statistics

Downloads/month

0

Quality Score

0%

Bundle Size

NPM Keywords

tpmjs
discord
ai
communication

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai