Discord: no member moderation or role management #107

Closed
opened 2026-09-02 23:25:44 -04:00 by Salastil · 1 comment
Owner

Kick, ban and timeout of a guild member are not implemented (only leave_guild and DM-level actions exist), and roles cannot be assigned. moho computes permissions locally and offers none of the actions they permit - which is the opposite way round from Matrix, where the moderation UI is the most complete part.

Done looks like: kick/ban/timeout from the member list where permission allows, and role assignment for a member.

Kick, ban and timeout of a guild member are not implemented (only `leave_guild` and DM-level actions exist), and roles cannot be assigned. moho computes permissions locally and offers none of the actions they permit - which is the opposite way round from Matrix, where the moderation UI is the most complete part. **Done looks like:** kick/ban/timeout from the member list where permission allows, and role assignment for a member.
Salastil added the feature label 2026-09-03 13:11:35 -04:00
Author
Owner

Finished — https://git.salastil.com/Salastil/nobilis/commit/2e10190 and https://git.salastil.com/Salastil/moho/commit/45f92ba

Kick, ban, timeout and role assignment from the member list, gated on what the account may actually do. Discord has no endpoint for "what may I do", so it is computed from the roles the way its own client does — advisory, since Discord re-checks and refuses in its own words.

A bug underneath this one: for this kind of account the guilds arrive inside READY, and guild roles were only ever stored from GUILD_CREATE, which never fires. Every guild had an empty role table — so the powers read false everywhere, and the existing mention-roles feature had been quietly answering "none" too. Roles are now stored wherever a guild is registered.

Verified: powers read true in a guild this account owns and false elsewhere, with 246 / 25 / 15 roles now visible where there had been none. Not verified: the actions themselves — kick, ban, timeout and role changes are writes against real servers, and after today's deauth I am not exercising Discord write paths without being asked.

Finished — https://git.salastil.com/Salastil/nobilis/commit/2e10190 and https://git.salastil.com/Salastil/moho/commit/45f92ba Kick, ban, timeout and role assignment from the member list, gated on what the account may actually do. Discord has no endpoint for "what may I do", so it is computed from the roles the way its own client does — advisory, since Discord re-checks and refuses in its own words. **A bug underneath this one:** for this kind of account the guilds arrive inside READY, and guild roles were only ever stored from GUILD_CREATE, which never fires. Every guild had an empty role table — so the powers read false everywhere, and the existing mention-roles feature had been quietly answering "none" too. Roles are now stored wherever a guild is registered. **Verified:** powers read true in a guild this account owns and false elsewhere, with 246 / 25 / 15 roles now visible where there had been none. **Not verified:** the actions themselves — kick, ban, timeout and role changes are writes against real servers, and after today's deauth I am not exercising Discord write paths without being asked.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#107