Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Fix voice
Browse files Browse the repository at this point in the history
  • Loading branch information
Azoy committed Jul 7, 2017
1 parent b090424 commit 0d76407
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Sources/Sword/Gateway/Gateway.swift
Expand Up @@ -55,6 +55,7 @@ extension Gateway {

self.session?.onConnect = { [unowned self] in
self.isConnected = true
self.handleConnect()
}

self.session?.onText = { [unowned self] text in
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sword/Voice/VoiceConnection.swift
Expand Up @@ -270,7 +270,7 @@ public class VoiceConnection: Gateway, Eventable {
guard self.identify != nil else { return }

#if os(macOS)
self.session?.disconnect()
self.session?.write(string: self.identify!)
#else
try? self.session?.send(self.identify!)
#endif
Expand Down

0 comments on commit 0d76407

Please sign in to comment.