Reply to a Discord message
Automatically reply to a Discord message on discord.com. Reply to a specific Discord message, addressed by its own url. Unlike discord.com/post_message, this creates a proper reply — visible as a reference to the original message rather than a plain new post in the channel. Returns the new message's id, channel id, timestamp and content, plus the id of the message it replied to.
Input
message requiredThe reply text. Discord's own limit is 2000 characters.
messageUrl requiredFull url of the message to reply to, e.g. https://discord.com/channels/<guildId>/<channelId>/<messageId>. discord.com/read_messages or discord.com/search_messages return the ids to build one.
Output
sent requiredchannelId requiredrepliedTo requiredThe id of the message this replied to, as Discord's own response records it.
content optionalmessageId optionaltimestamp optionalFAQ
Read Discord messages
Reads the most recent messages of one Discord channel or direct message (author, timestamp, text), newest first, loading older ones until the requested count; complete says whether the whole history came back. Requires being signed in. A DM or group DM is read the same way: pass its url from discord.com/list_dms. It also reads a thread or a forum post, since both are channels in their own right: pass the post's url (from discord.com/list_forum_posts). To list the posts of a forum channel rather than its messages, use discord.com/list_forum_posts. To read several channels, run the script once per channel.
Search Discord server messages
Search one Discord server's message history with Discord's own search, as the signed-in account, newest first. Search by words (content), and narrow by authors, channels, mentioned users and content type, each given as ids: get user ids from discord.com/get_member_list and channel ids from discord.com/list_channels. Returns one page of up to 25 matching messages with their author, text, time and link, Discord's total count of matches, and next_offset to read the next page (null on the last one). Fails with a clear error when the browser is not signed in to Discord, when the account is not a member of the server or can see no text channel in it, or when Discord is still indexing the server. Direct messages are not searched.
Post a Discord message
Posts a text message, optionally with a file attached (the attachment file input, renamed with filename), in a Discord channel addressed by its URL. Requires being logged in to Discord. Returns `sent` plus the created message's messageId, channelId, timestamp and content as Discord stored it. The message is visible to everyone who can see the channel. Empty messages, messages over 2000 characters and forum channels are refused with a clear reason. Use dry_run to check a channel and message without posting.
