KosmoKrator

communication

Discord CLI for Cron Jobs

Use the Discord CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write Bearer token auth

Discord CLI for Cron Jobs

Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.

Use the headless CLI from cron when an operation should run without an interactive agent session. The Discord CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Discord CLI for Cron Jobs
kosmokrator integrations:configure discord --set access_token="$DISCORD_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call discord.discord_list_channels '{"guild_id":"example_guild_id"}' --json

Discovery Before Execution

Agents and scripts can inspect Discord docs and schemas before choosing a function.

kosmo integrations:docs discord --json
kosmo integrations:docs discord.discord_list_channels --json
kosmo integrations:schema discord.discord_list_channels --json
kosmo integrations:search "Discord" --json
kosmo integrations:list --json

Useful Discord CLI Functions

FunctionTypeParametersDescription
discord.discord_list_channels Read guild_id List all channels in a Discord guild. Returns channel IDs, names, types, and topics.
discord.discord_get_channel Read channel_id Get information about a Discord channel by its ID. Returns the channel's ID, name, type, topic, and other properties.
discord.discord_send_message Write channel_id, content, embeds, tts Send a message to a Discord channel. Supports text content and rich embeds. Returns the sent message ID and channel ID.
discord.discord_list_messages Read channel_id, limit, before, after Get messages from a Discord channel. Supports pagination with before/after and limit. Returns message IDs, content, author info, and timestamps.
discord.discord_list_guilds Read limit, before, after List guilds the current Discord user is a member of. Returns guild IDs, names, icons, and owner status. Use limit, before, and after for pagination.
discord.discord_get_guild Read guild_id Get information about a Discord guild by its ID. Returns the guild's ID, name, icon, description, member count, and other properties.
discord.discord_get_current_user Read none Retrieve the currently authenticated Discord user. Returns the user's ID, username, discriminator, and avatar. Useful for identifying which account or token is in use.

Automation Notes

Related Discord CLI Pages