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 · 2 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)
    } 
}
@glotchimo
Copy link

For clarity, are you saying the bot's activity doesn't get updated according to whatever you're posting when you call UpdateStatusComplex?

@outmaneuver
Copy link
Author

For clarity, are you saying the bot's activity doesn't get updated according to whatever you're posting when you call UpdateStatusComplex?

i was trying to use this feature from a user account as in to give the account a rich presence... but it did not work although it worked for making it stay in a voice channel

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

2 participants