From e8131db8df3272d6959abab6988273b78d07f35e Mon Sep 17 00:00:00 2001 From: diamondburned Date: Sat, 30 Oct 2021 16:43:28 -0700 Subject: [PATCH] discord: Add VoiceState.SelfVideo; fixes #287 --- discord/time.go | 1 + discord/voice.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/discord/time.go b/discord/time.go index 6758bc1..23508fa 100644 --- a/discord/time.go +++ b/discord/time.go @@ -30,6 +30,7 @@ func NowTimestamp() Timestamp { func (t *Timestamp) UnmarshalJSON(v []byte) error { str := strings.Trim(string(v), `"`) if str == "null" { + *t = Timestamp{} return nil } diff --git a/discord/voice.go b/discord/voice.go index 59d3683..9baee90 100644 --- a/discord/voice.go +++ b/discord/voice.go @@ -15,7 +15,10 @@ type VoiceState struct { SelfDeaf bool `json:"self_deaf"` SelfMute bool `json:"self_mute"` SelfStream bool `json:"self_stream,omitempty"` + SelfVideo bool `json:"self_video,omitempty"` Suppress bool `json:"suppress"` + + RequestToSpeakTimestamp Timestamp `json:"request_to_speak_timestamp"` } type VoiceRegion struct {