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

improve presence UX #196

Merged
merged 9 commits into from Sep 4, 2022
Merged

improve presence UX #196

merged 9 commits into from Sep 4, 2022

Conversation

mlnrDev
Copy link
Member

@mlnrDev mlnrDev commented Aug 31, 2022

this PR changes presence data to be optional, resulting in not having to pass unwanted data.

before:

bot.WithGatewayConfigOpts(
			gateway.WithIntents(gateway.IntentsNone),
			gateway.WithPresence(gateway.NewListeningPresence("music", discord.OnlineStatusOnline, false)),
)

after:

// this yields the same result as the example above
bot.WithGatewayConfigOpts(
			gateway.WithIntents(gateway.IntentsNone),
			gateway.WithPresenceOpts(gateway.WithListeningActivity("music")),
)

@mlnrDev mlnrDev changed the title improve initial presence UX improve presence UX Aug 31, 2022
Copy link
Member

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atm all fields in MessageDataPresenceUpdate are not optional. like this all fields get overwritten regardless.
are they optional(discord docs don't say so)? we need to check else this pr is kinda pointless

gateway/gateway_config.go Outdated Show resolved Hide resolved
gateway/gateway_messages.go Outdated Show resolved Hide resolved
@mlnrDev mlnrDev requested a review from topi314 September 1, 2022 13:43
@mlnrDev mlnrDev added this to the v1.0.0 milestone Sep 4, 2022
@mlnrDev mlnrDev removed the s:proposal label Sep 4, 2022
@mlnrDev mlnrDev merged commit f30ee80 into development Sep 4, 2022
@mlnrDev mlnrDev deleted the patch/improve-presence-ux branch September 4, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants