forked from pothtonswer/discordmuffin
Fix a couple bugs I just created.
This commit is contained in:
parent
706fd1c03f
commit
397d04b1ff
2 changed files with 3 additions and 3 deletions
4
voice.go
4
voice.go
|
@ -615,7 +615,7 @@ func (v *VoiceConnection) opusReceiver(UDPConn *net.UDPConn, close <-chan struct
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close closes the voice ws and udp connections
|
// Close closes the voice ws and udp connections
|
||||||
func (v *VoiceConnection) close() {
|
func (v *VoiceConnection) Close() {
|
||||||
|
|
||||||
v.Lock()
|
v.Lock()
|
||||||
defer v.Unlock()
|
defer v.Unlock()
|
||||||
|
@ -667,7 +667,7 @@ func (v *VoiceConnection) Disconnect() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close websocket and udp connections
|
// Close websocket and udp connections
|
||||||
v.close()
|
v.Close()
|
||||||
|
|
||||||
delete(v.session.VoiceConnections, v.GuildID)
|
delete(v.session.VoiceConnections, v.GuildID)
|
||||||
|
|
||||||
|
|
2
wsapi.go
2
wsapi.go
|
@ -344,7 +344,7 @@ func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *Voi
|
||||||
// to verify if this connection is valid or not.
|
// to verify if this connection is valid or not.
|
||||||
|
|
||||||
if voice.ChannelID != cID {
|
if voice.ChannelID != cID {
|
||||||
err = voice.ChangeChannel(cID)
|
err = voice.ChangeChannel(cID, mute, deaf)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue