ToolsIntegrations
discord
Discord Bot API — post messages. For community bots, notifier agents, and interactive slash-command workflows.
import { discord } from '@agentskit/tools'
const runtime = createRuntime({
adapter,
tools: [...discord({ token: process.env.DISCORD_BOT_TOKEN! })],
})Sub-tools
| Name | Purpose |
|---|---|
discordPostMessage | Send a message to a channel (supports embeds) |
Bundled: discord(config).
Config
type DiscordConfig = {
token: string // Bot token
fetch?: typeof fetch
}Example — community bot
const runtime = createRuntime({
adapter,
systemPrompt: 'You answer AgentsKit questions, cite docs, and @mention maintainers on hard asks.',
tools: [
...discord({ token: process.env.DISCORD_BOT_TOKEN! }),
...ragTool,
],
})
await runtime.run('User said: "how do I swap OpenAI for Claude?"')Credentials
- Create bot at discord.com/developers/applications.
- Required intents:
GUILDS,GUILD_MESSAGES. AddMESSAGE_CONTENTif parsing user replies. - Invite to server with
bot+applications.commandsscopes.
Related
- Integrations overview · slack.
- Recipe: discord-bot — full slash-command + HITL workflow.