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

Applications should use application flags #1072

Merged
merged 1 commit into from
Jul 27, 2021
Merged

Applications should use application flags #1072

merged 1 commit into from
Jul 27, 2021

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Jul 25, 2021

This shows up in the ready payload in the example on the site:

Event: Ready(Ready { application: PartialApplication { flags: DISCORD_CERTIFIED_MODERATOR, id: ApplicationId(....) }, guilds: [], session_id: "....", shard: Some([0, 1]), user: CurrentUser { avatar: ...., bot: true, discriminator: "....", email: None, flags: Some((empty)), id: UserId(....), locale: None, mfa_enabled: true, name: "....", premium_type: None, public_flags: None, verified: Some(true) }, version: 8 })

Evidently bots can't be certified moderators.

@7596ff
Copy link
Contributor

7596ff commented Jul 25, 2021

thanks for getting this lol. my bad

@zeylahellyer
Copy link
Member

This is funny because I had just noticed that a couple hours before you PR'd this

@BlackHoleFox BlackHoleFox merged commit 79702d5 into twilight-rs:main Jul 27, 2021
@A5rocks A5rocks deleted the fix-ready-payload branch July 28, 2021 03:06
7596ff added a commit that referenced this pull request Jul 31, 2021
Enhancements

Fully support audit logs by creating types for Audit Log Changes and
updating Audit Log Change Keys with new variants. Changes were generic
`serde_value::Value`s, which provide no typed information. There are now
variants with typed `new` and `old` values - checked against the API -
which may or may not both always be present, or never.

The `twilight_model::guild::audit_log` module is now entirely documented
and tested as well. This has been manually tested by creating as many
different audit log changes as could be created in the API and then
deserializing the past 100 entries.

([#1022] - [@zeylahellyer]).

Changes

Rename the `GuildCreate` audit log event to `GuildUpdate` ([#966] -
[@zeylahellyer]).

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

Fixes

`PartialApplication` now uses `ApplicationFlags` instead of `UserFlags` ([#1072] - [@A5rocks]).

[#966]: #966
[#1022]: #1022
[#1041]: #1041
[#1072]: #1072

[@A5rocks]: https://github.com/A5rocks
[@Gelbpunkt]: https://github.com/Gelbpunkt
[@zeylahellyer]: https://github.com/zeylahellyer
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

Successfully merging this pull request may close these issues.

4 participants