Fixes for compatibility with Go 1.3, closes #56.
This commit is contained in:
parent
d737b91b77
commit
d6314c034e
2 changed files with 6 additions and 6 deletions
10
restapi.go
10
restapi.go
|
@ -152,11 +152,11 @@ func (s *Session) UserUpdate(userID, email, password, username, avatar, newPassw
|
||||||
// If left blank, avatar will be set to null/blank
|
// If left blank, avatar will be set to null/blank
|
||||||
|
|
||||||
data := struct {
|
data := struct {
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Avatar string `json:"avatar,omitempty"`
|
Avatar string `json:"avatar,omitempty"`
|
||||||
NewPassword json.Token `json:"new_password,omitempty"`
|
NewPassword string `json:"new_password,omitempty"`
|
||||||
}{email, password, username, avatar, newPassword}
|
}{email, password, username, avatar, newPassword}
|
||||||
|
|
||||||
body, err := s.Request("PATCH", USER(userID), data)
|
body, err := s.Request("PATCH", USER(userID), data)
|
||||||
|
|
2
voice.go
2
voice.go
|
@ -299,7 +299,7 @@ func (s *Session) VoiceUDPKeepalive(i time.Duration) {
|
||||||
// into it. Then send that over the UDP connection to Discord
|
// into it. Then send that over the UDP connection to Discord
|
||||||
|
|
||||||
ticker := time.NewTicker(i * time.Millisecond)
|
ticker := time.NewTicker(i * time.Millisecond)
|
||||||
for range ticker.C {
|
for _ = range ticker.C {
|
||||||
sb := make([]byte, 8)
|
sb := make([]byte, 8)
|
||||||
sb[0] = 0x80
|
sb[0] = 0x80
|
||||||
sb[1] = 0xc9
|
sb[1] = 0xc9
|
||||||
|
|
Loading…
Reference in a new issue