Open colecrouter opened 3 years ago
Same here
On the latest update 0.23, still seems to happen with the new system:
var act []*discordgo.Activity
act = append(act, &discordgo.Activity{Name: "game", Type: discordgo.ActivityTypeGame})
idle := 10
s.UpdateStatusComplex(discordgo.UpdateStatusData{IdleSince: &idle, Activities: act, AFK: true})
doesn't seem to work. Also, the program seems to crash(?) if I remove act
from the function call.
same for me with:
_, err := discord.UserUpdateStatus(discordgo.StatusDoNotDisturb)
If you want to set bot's status, I found this way:
discordClient.Identify.Presence.Status = string(discordgo.StatusOnline)
if err = discordClient.Open(); err != nil {
log.Fatal(errors.Annotate(err, "opening websocket connection failed"))
}
UpdateStatusComplex
seems to work for me, but I am ahead of the v0.23.2 tag (I'm on 0fad116). I also have not tried to set activities, so ymmv there.
session, _ := discordgo.New(...)
err = session.UpdateStatusComplex(discordgo.UpdateStatusData{
AFK: false,
Status: string(discordgo.StatusOnline),
})
When running
I get:
If I run
it sets "status" properly, but bot does not go idle.
err
is alsonil
this time.EDIT: I'm running the latest release btw.