aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/bwmarrin/discordgo/wsapi.go
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2023-08-18 00:08:21 -0700
committerJordan <me@jordan.im>2023-08-18 00:08:21 -0700
commit61553158764c6801578076c72d8bffb423e343cc (patch)
tree5d45cf4b6699eebf01e9f2b6ac9ff0000819ebd2 /vendor/github.com/bwmarrin/discordgo/wsapi.go
parent001a042ccba1c3faf340d8217ee8d15efa60dc05 (diff)
downloadkeep-61553158764c6801578076c72d8bffb423e343cc.tar.gz
keep-61553158764c6801578076c72d8bffb423e343cc.zip
misc: go get -u; go mod tidy; go mod vendor
Diffstat (limited to 'vendor/github.com/bwmarrin/discordgo/wsapi.go')
-rw-r--r--vendor/github.com/bwmarrin/discordgo/wsapi.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/bwmarrin/discordgo/wsapi.go b/vendor/github.com/bwmarrin/discordgo/wsapi.go
index 2579ee4..6c82388 100644
--- a/vendor/github.com/bwmarrin/discordgo/wsapi.go
+++ b/vendor/github.com/bwmarrin/discordgo/wsapi.go
@@ -320,7 +320,7 @@ func (s *Session) heartbeat(wsConn *websocket.Conn, listening <-chan interface{}
}
}
-// UpdateStatusData ia provided to UpdateStatusComplex()
+// UpdateStatusData is provided to UpdateStatusComplex()
type UpdateStatusData struct {
IdleSince *int `json:"since"`
Activities []*Activity `json:"activities"`
@@ -361,6 +361,14 @@ func (s *Session) UpdateGameStatus(idle int, name string) (err error) {
return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeGame, name, ""))
}
+// UpdateWatchStatus is used to update the user's watch status.
+// If idle>0 then set status to idle.
+// If name!="" then set movie/stream.
+// if otherwise, set status to active, and no activity.
+func (s *Session) UpdateWatchStatus(idle int, name string) (err error) {
+ return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeWatching, name, ""))
+}
+
// UpdateStreamingStatus is used to update the user's streaming status.
// If idle>0 then set status to idle.
// If name!="" then set game.