join_server_via_invite
Join a Discord server using an invite link or code, e.g. https://discord.com/invite/<code> or just the code. Returns the server's id and name, and whether the account was already a member before this ran. This is a write with lasting effect: joining a server is visible to its members and puts you on its member list until you leave.
Input
invite requiredAn invite link (e.g. https://discord.com/invite/abc123 or https://discord.gg/abc123, with or without tracking query params) or a bare invite code (abc123). Surrounding whitespace is tolerated.
Output
joined requiredguildId requiredguildName requiredalready_member requiredFAQ
Read Discord messages
Reads the most recent messages of a Discord channel (author, timestamp, text), newest first, scrolling up to load more until the requested count. Requires being logged in. 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) and you get its replies plus the opening post, newest first — there is no separate thread-reading script. To list the posts of a forum channel rather than its messages, use discord.com/list_forum_posts instead.
Post a Discord message
Posts a text message in a Discord channel, addressed by channel URL. Requires being logged in to Discord. Returns `sent` plus the created message's messageId, channelId, timestamp and content as Discord stored it. This is a write: the message appears in the channel and is visible to everyone who can see it. Discord's own message limits are checked before anything is sent, so a message that is empty or whitespace-only, or longer than 2000 characters, is refused straight away with a clear reason.
Discord login
Opens the Discord web app in the browser and reports whether the account is signed in, together with the username and display name it is signed in as. Run this first: the other Discord scripts need the web app open on a signed-in session.
