You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confusingly, the relevant request is actually Modify Guild Member, as Modify User Voice State is stated to only work on stage channels. The former's documentation states:
If the channel_id is set to null, this will force the target user to be disconnected from voice.
Howdy, you've identified an issue that we've been living with for a while due to some poor design in our API handler that the rest of the library depends on.
Basically, we don't have a way to send a null value to the HTTP API because we compact out null values just before sending the request.
I'm going to look into a workaround to make this sort of thing possible in v3 before we switch to work on v4
I randomly found this, and in fact it's easily possible since the acceptance of PR #113
It's been a while since the method no longer deletes values at nil, but as it was on the v3.4.2 gem doc, and not the 'main' branch one (as the issue link suggests), it wasn't noticed.
All it takes is one character to solve the problem 🤣
Discord.js and discordpy both support this feature by passing their equivalent of
nil
:discordrb's equivalent,
Server.move
, evaluates the channel's ID and fails ifnil
is passed.Admittedly, I don't immediately see how this is possible via the API, as the modify user voice state endpoint doesn't allow for a null channel id.
https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
Still, given this is implemented in two other libraries, it must be possible.
The text was updated successfully, but these errors were encountered: