Discord
Servers, channels, messages, reactions, members and threads, agent sends need an opt-in, deletes are node only, no pings by default
Beta v0.1.0 Node.js 21 actions ToS risk low
About
A Graphrt plugin for the Discord REST API v10 with a bot token: servers (guilds), channels, messages, reactions, members and threads. It uses only HTTP (no Gateway connection), so it reads and sends on demand, it does not receive events.
What it can do
- Bot and servers: get_current_user, list_my_guilds, get_guild, list_guild_channels
- Members: list_guild_members, search_guild_members, get_guild_member
- Messages: list_messages (newest first, next_cursor pages back in time), get_message, send_message (optional reply), edit_message, delete_message (node only)
- Reactions: add_reaction, remove_own_reaction, list_reactions
- Threads: list_active_threads, list_public_archived_threads, start_thread_from_message, start_thread (send into a thread with send_message and the thread id as channel_id)
- api_request: any other endpoint (GET only for agents)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Bot user
discord.get_current_user - List servers
discord.list_my_guilds - Get server
discord.get_guild - List channels
discord.list_guild_channels - List members
discord.list_guild_members - Search members
discord.search_guild_members - Get member
discord.get_guild_member - Get channel
discord.get_channel - List messages
discord.list_messages - Get message
discord.get_message
Show all 21 actions
- Users who reacted
discord.list_reactions - Active threads
discord.list_active_threads - Archived threads
discord.list_public_archived_threads - Send message
discord.send_message - Edit message
discord.edit_message - Delete message
discord.delete_message - Add reaction
discord.add_reaction - Remove reaction
discord.remove_own_reaction - Thread from message
discord.start_thread_from_message - Start thread
discord.start_thread - Discord REST API request
discord.api_request
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
DISCORD_BOT_TOKENRequiredBot token, sent as Authorization: Bot <token> -
DISCORD_TOOL_ALLOW_SENDOptional1 lets agent tools send and edit messages and start threads -
DISCORD_TOOL_ALLOW_MASS_MENTIONSOptional1 lets agent tools ping @everyone, @here or roles
How to use it
In Graphrt Desktop
- Open Plugins and search for Discord.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install discord workflow.yaml
- id: notify
type: discord.send_message
channel_id: "123456789012345678" # quote snowflakes: they are larger than JSON numbers can hold exactly
content: "Deploy {{#start.version#}} is live"
- id: thumbs
type: discord.add_reaction
channel_id: "123456789012345678"
message_id: "{{#notify.data.id#}}"
emoji: "👍" # custom emoji: name:id