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

Update gateway intents with up-to-date information #2585

Closed
wants to merge 2 commits into from

Conversation

cheesycod
Copy link
Contributor

Updates the gateway intents with up to date information. Also removes GUILD_BANS as it doesn't even exist anymore

@github-actions github-actions bot added the model Related to the `model` module. label Nov 11, 2023
@mkrasnitski
Copy link
Collaborator

mkrasnitski commented Nov 11, 2023

Do you think it might be better to simply deprecate GUILD_BANS, since it's basically just been renamed?

@cheesycod
Copy link
Contributor Author

Do you think it might be better to simply deprecate GUILD_BANS, since it's basically just been renamed?

It was deprecated until now (that was what I earlier did). But, tbh I think it should be removed now so it can be one breaking release instead of doing it later in my opinion.

@mkrasnitski
Copy link
Collaborator

I'm talking about specifically marking the constant as #[deprecated], which isn't currently the case. I think that since it's just a name, it's not a big deal to mark it as deprecated and wait a release cycle to remove it, to give people time to change. Serenity already has some things which will are marked deprecated in 0.12 and will be removed in 0.13.

But, if you think most people won't notice, then breaking it immediately might be fine too.

@cheesycod
Copy link
Contributor Author

I'm talking about specifically marking the constant as #[deprecated], which isn't currently the case. I think that since it's just a name, it's not a big deal to mark it as deprecated and wait a release cycle to remove it, to give people time to change. Serenity already has some things which will are marked deprecated in 0.12 and will be removed in 0.13.

But, if you think most people won't notice, then breaking it immediately might be fine too.

True, I'm conflicted by that too. I do think that its a really simple change to make anyways and that most people won't really notice. I bet most just enable all non-priv intents anyways

Comment on lines -464 to -465
/// Backwards compatibility with old gateway event name. Same as GUILD_MODERATION
const GUILD_BANS = 1 << 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

After some thought, I think the best course of action is to just keep the old name and mark it with #[deprecated = "use `GatewayIntents::GUILD_MODERATION` instead"].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, will do in a bit

@mkrasnitski
Copy link
Collaborator

mkrasnitski commented Nov 16, 2023

Also, turns out MANAGE_EMOJIS_AND_STICKERS has also been renamed to MANAGE_GUILD_EXPRESSIONS (See docs.) Would be good to rename and deprecate the old name for this permission as well.

EDIT: I was confusing permissions and gateway intents. Ignore what I said; this change should be made separately since there are other related permissions changes it could go with.

@cheesycod
Copy link
Contributor Author

gateway intents. Ignore what I said; this change should be made separately since there are other related permissions changes

Alright

@mkrasnitski
Copy link
Collaborator

Just to be clear, I still think GUILD_BANS should be deprecated with this PR. Sorry for the confusion.

@tazz4843
Copy link
Contributor

Can be closed in favor of #2593

@arqunis arqunis closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants