Open tehtnaz opened 3 weeks ago
UPDATE: After a long while of toying about, I found that using connection.setStateUpdate()
to update the channelId, setting the connection to State.RECONNECTING
and calling connection.connect()
worked! I still wish this was one function though, so I am updating the issue.
leaveVoiceChannel()
andjoinVoiceChannel()
are the only ways of easily modifying connections that is exposed in the library.It would be nice to have an easy to use function like moveVoiceChannel().
Usage could be:
moveVoiceChannel({channelId: string, guildId: string, selfDeaf?: bool, selfMute?: bool})
(self deaf and self mute defaulting to previous value)An alternative would be by removing the "internal" tag from the existing functions so that their entries are in the documentation and explaining how to move the connection in the documentation. eg. "To move a bot from one voice channel to another in the same guild" :
connection.setStateUpdate({chanelID: <newId>, sessionId: <existing_id>, self_deaf, self_mute})
,State.RECONNECTING
,connection.connect()