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

Allow Bot#initialize to request only unprivileged intents #55

Merged
merged 3 commits into from
Sep 17, 2021
Merged

Allow Bot#initialize to request only unprivileged intents #55

merged 3 commits into from
Sep 17, 2021

Conversation

biqqles
Copy link
Contributor

@biqqles biqqles commented May 23, 2021

Summary

With v8, intents are enforced when identifying. By default the library will request all intents, including privileged ones, even if the bot does not use them. This PR makes it easier for the authors of such bots to only request unprivileged intents as opposed to all intents.

It also allows you to specify no intents. Previously the documentation suggested that you could use nil for this, but this would have caused an error.


Added

Discordrb::UNPRIVILEGED_INTENTS
Discordrb::NO_INTENTS

Changed

Bot#initialize: intents can now be equal to :unprivileged
Bot#initialize: intents can now be equal to :none

@swarley swarley merged commit ce7fefc into shardlab:main Sep 17, 2021
@swarley
Copy link
Member

swarley commented Sep 17, 2021

Thanks!

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.

None yet

2 participants