Discord: slash commands and message components do nothing #105

Closed
opened 2026-09-02 23:25:43 -04:00 by Salastil · 2 comments
Owner

Interactions are absent: no / command list, no way to run one, and buttons or select menus on a message are not rendered. A great many servers now work through bots that answer only to slash commands, so those channels are read-only in practice.

Done looks like: a channel's application commands are listed and can be run, and message components are drawn and clickable.

Interactions are absent: no `/` command list, no way to run one, and buttons or select menus on a message are not rendered. A great many servers now work through bots that answer only to slash commands, so those channels are read-only in practice. **Done looks like:** a channel's application commands are listed and can be run, and message components are drawn and clickable.
Salastil added the feature label 2026-09-03 13:11:34 -04:00
Author
Owner

Finished — https://git.salastil.com/Salastil/nobilis/commit/af11ded and https://git.salastil.com/Salastil/moho/commit/e3dcebe

Components are parsed into words rather than Discord's type numbers, stored in their own column (a role picker is posted once and pressed for months), and drawn under the message in the rows they were laid out in — buttons by style, link buttons as links, select menus as menus. Typing / lists the channel's application commands with the same keys as the name picker; words typed after the name fill the command's arguments in order.

Verified: the command list is asked for correctly (real channels answer with their commands, or with Discord's own "Missing Permissions"), component parsing is covered by tests against real payload shapes, and rendering is confirmed on screen.

Not verified, deliberately: running a command and pressing a button both POST to /interactions, which is the endpoint Discord's anti-automation watches most closely — a test account was deauthed today for two ordinary API sends. The code is there and wired up; the first press is a real risk to the account that makes it.

Finished — https://git.salastil.com/Salastil/nobilis/commit/af11ded and https://git.salastil.com/Salastil/moho/commit/e3dcebe Components are parsed into words rather than Discord's type numbers, stored in their own column (a role picker is posted once and pressed for months), and drawn under the message in the rows they were laid out in — buttons by style, link buttons as links, select menus as menus. Typing `/` lists the channel's application commands with the same keys as the name picker; words typed after the name fill the command's arguments in order. **Verified:** the command list is asked for correctly (real channels answer with their commands, or with Discord's own "Missing Permissions"), component parsing is covered by tests against real payload shapes, and rendering is confirmed on screen. **Not verified, deliberately:** running a command and pressing a button both POST to `/interactions`, which is the endpoint Discord's anti-automation watches most closely — a test account was deauthed today for two ordinary API sends. The code is there and wired up; the first press is a real risk to the account that makes it.
Author
Owner

Extended, per the follow-up: the menu now works on every protocol rather than Discord alone — https://git.salastil.com/Salastil/nobilis/commit/d37a795 and https://git.salastil.com/Salastil/moho/commit/f0dbc40

A new listCommands merges the daemon's own commands with whatever a channel's bots offer. The built-in table lives beside the backends that parse them (IRC has 22, Matrix has /me), matched as a subsequence rather than a prefix so dv finds devoice. Each row shows the command, its arguments in manual-page notation, what it does, and who answers it; Discord's own commands are assembled into the same shape from the options they declare.

Tab and Enter both complete the name into the box rather than firing it, since almost every command takes something after it.

Verified live against an IRC channel: ki → /kick, dv → /devoice, me → /me then /mode, empty → all 22, zzz → none, and Tab turning /ki into /kick .

Extended, per the follow-up: the menu now works on every protocol rather than Discord alone — https://git.salastil.com/Salastil/nobilis/commit/d37a795 and https://git.salastil.com/Salastil/moho/commit/f0dbc40 A new `listCommands` merges the daemon's own commands with whatever a channel's bots offer. The built-in table lives beside the backends that parse them (IRC has 22, Matrix has `/me`), matched as a subsequence rather than a prefix so `dv` finds `devoice`. Each row shows the command, its arguments in manual-page notation, what it does, and who answers it; Discord's own commands are assembled into the same shape from the options they declare. Tab and Enter both complete the name into the box rather than firing it, since almost every command takes something after it. Verified live against an IRC channel: `ki` → /kick, `dv` → /devoice, `me` → /me then /mode, empty → all 22, `zzz` → none, and Tab turning `/ki` into `/kick `.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#105