Compare commits

..
3 Commits
Author SHA1 Message Date
Dustin Pianalto 458250eb80 Update status updater 2021-08-05 23:21:20 -08:00
Dustin Pianalto 5258cf33a7 Test statis update 2021-08-05 22:46:32 -08:00
Dustin Pianalto f70fa91b00 Test status update 2021-08-05 22:40:25 -08:00
+4 -6
View File
@@ -1,10 +1,11 @@
package disgoman
import (
"github.com/bwmarrin/discordgo"
"log"
"math/rand"
"time"
"github.com/bwmarrin/discordgo"
)
/* status-manager.go:
@@ -37,11 +38,8 @@ func (s *StatusManager) SetInterval(interval string) {
// UpdateStatus updates the status of the bot
func (s *StatusManager) UpdateStatus(session *discordgo.Session) error {
i := rand.Intn(len(s.Values))
usd := discordgo.UpdateStatusData {
Status: s.Values[i],
AFK: false,
}
err := session.UpdateStatusComplex(usd)
err := session.UpdateGameStatus(0, s.Values[i])
log.Println(err)
return err
}