Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My bot is not getting an activity when attempting to use UpdateStatusComplex() #1523

Open
outmaneuver opened this issue Apr 19, 2024 · 0 comments

Comments

@outmaneuver
Copy link

outmaneuver commented Apr 19, 2024

Here's my code. The status such as online/dnd/idle works fine but whatever i try my bot is just not getting an activity nor any errors

func (b *Bot) onReady(s *discordgo.Session, r *discordgo.Ready) {
    configStatus := b.ConfigStatus // or get it from config

    // trim leading and trailing whitespace from status
    us := &discordgo.UpdateStatusData{
        Activities: []*discordgo.Activity{
            {
                Name: "something",
                Type: discordgo.ActivityTypeGame,
        },
        },
        Status: configStatus, // online/dnd/idle from config < -- this part works fine btw.
        AFK:    false,
    }
    err := b.Session.UpdateStatusComplex(*us)
    if err != nil {
        log.Fatalf("error updating status: %v", err)
    } 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant