Discord: no way to create an invite #121

Closed
opened 2026-09-06 12:04:30 -04:00 by Salastil · 1 comment
Owner

moho can accept an invite - POST /invites/{code} (backend/discord.rs:850) is what
joinDiscordGuild calls - but it cannot make one. There is no path to
POST /channels/{id}/invites, so inviting somebody to a server or a group means
opening the official client to get a link.

What is needed

  • POST /channels/{channel_id}/invites with the ordinary options: expiry, maximum
    uses, temporary membership.
  • An entry where the gesture belongs - the channel's own menu, beside the things that
    already act on a channel.
  • Copy the resulting link, which is the whole point of making one.

Done looks like: right-click a channel, make an invite, paste it to somebody.

Reference: the official Discord client.

moho can accept an invite - `POST /invites/{code}` (`backend/discord.rs:850`) is what `joinDiscordGuild` calls - but it cannot make one. There is no path to `POST /channels/{id}/invites`, so inviting somebody to a server or a group means opening the official client to get a link. **What is needed** - `POST /channels/{channel_id}/invites` with the ordinary options: expiry, maximum uses, temporary membership. - An entry where the gesture belongs - the channel's own menu, beside the things that already act on a channel. - Copy the resulting link, which is the whole point of making one. **Done looks like:** right-click a channel, make an invite, paste it to somebody. Reference: the official Discord client.
Salastil added the featureprotocollow priority labels 2026-09-06 12:04:30 -04:00
Salastil removed the protocol label 2026-09-06 12:49:14 -04:00
Author
Owner

Finished in nobilis 2c024de and moho 84fd94b.

POST /channels/{id}/invites, through send_write like every other thing this account does rather than reads. The link is built daemon-side in the short discord.gg form the official client copies - the code alone is not something anybody can paste.

It is a form rather than one button, because an invite is not one thing: a link posted in a public thread and one sent to a person want opposite answers to "how long" and "how many", and picking for somebody would be picking wrong half the time. The three options are Discord's own, the defaults are Discord's defaults (a day, unlimited uses, ordinary membership), and zero keeps Discord's meaning at both ends - never expires, and no limit.

The link is shown as well as copied. Copying silently is a gesture with no evidence it happened, and an invite is a thing people read before they send it. It clears when the panel shuts, since a link belongs to the options it was made with.

One judgement call: it is offered on channels and on group messages, but not on a one-to-one. Discord has no link into one - an invite there would have to add a third person, and Discord answers that by making a new group, which is what the button beside this one already does. Both arrive as kind: 'dm', so the roster is what tells them apart.

Also the first thing in this client to write to the clipboard, which is done from main: the page's own navigator.clipboard wants a secure context and a permission the app cannot grant itself. Text only.

Finished in nobilis [2c024de](https://git.salastil.com/Salastil/nobilis/commit/2c024de) and moho [84fd94b](https://git.salastil.com/Salastil/moho/commit/84fd94b). `POST /channels/{id}/invites`, through `send_write` like every other thing this account does rather than reads. The link is built daemon-side in the short `discord.gg` form the official client copies - the code alone is not something anybody can paste. It is a form rather than one button, because an invite is not one thing: a link posted in a public thread and one sent to a person want opposite answers to "how long" and "how many", and picking for somebody would be picking wrong half the time. The three options are Discord's own, the defaults are Discord's defaults (a day, unlimited uses, ordinary membership), and zero keeps Discord's meaning at both ends - never expires, and no limit. The link is shown as well as copied. Copying silently is a gesture with no evidence it happened, and an invite is a thing people read before they send it. It clears when the panel shuts, since a link belongs to the options it was made with. One judgement call: it is offered on channels and on group messages, but not on a one-to-one. Discord has no link into one - an invite there would have to add a third person, and Discord answers that by making a new group, which is what the button beside this one already does. Both arrive as `kind: 'dm'`, so the roster is what tells them apart. Also the first thing in this client to write to the clipboard, which is done from main: the page's own `navigator.clipboard` wants a secure context and a permission the app cannot grant itself. Text only.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#121