From d30d567dcb0a4d975d1ddfe4451935dbb5c98cf2 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Mon, 6 Apr 2020 11:50:34 -0800 Subject: [PATCH] Update comments for Godoc --- status-manager.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/status-manager.go b/status-manager.go index 2c57a09..dd90899 100644 --- a/status-manager.go +++ b/status-manager.go @@ -13,12 +13,12 @@ import ( * Disgoman (c) 2020 Dusty.P/dustinpianalto */ -// Add a status to the manager +// AddStatus to the manager func (s *StatusManager) AddStatus(status string) { s.Values = append(s.Values, status) } -// Remove a status from the manager +// RemoveStatus from the manager func (s *StatusManager) RemoveStatus(status string) []string { for i, v := range s.Values { if v == status { @@ -29,19 +29,19 @@ func (s *StatusManager) RemoveStatus(status string) []string { return s.Values } -// Sets interval to new value +// SetsInterval changes the update interval to new value func (s *StatusManager) SetInterval(interval string) { s.Interval = interval } -// Update the status now +// UpdateStatus actually updates the status of the bot func (s *StatusManager) UpdateStatus(session *discordgo.Session) error { i := rand.Intn(len(s.Values)) err := session.UpdateStatus(0, s.Values[i]) return err } -// Default StatusManager ready function which updates the status at the specified interval +// OnReady is the default StatusManager ready function which updates the status at the specified interval func (s *StatusManager) OnReady(session *discordgo.Session, _ *discordgo.Ready) { interval, err := time.ParseDuration(s.Interval) if err != nil {