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

feature: add new intents #233

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/discordrb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,21 @@ module Discordrb
server_message_typing: 1 << 11,
direct_messages: 1 << 12,
direct_message_reactions: 1 << 13,
direct_message_typing: 1 << 14
direct_message_typing: 1 << 14,
server_message_content: 1 << 15,
server_scheduled_events: 1 << 16,
auto_moderation_configuration: 1 << 20,
auto_moderation_execution: 1 << 21,
server_message_polls: 1 << 24,
direct_message_polls: 1 << 25
}.freeze

# All available intents
ALL_INTENTS = INTENTS.values.reduce(&:|)

# All unprivileged intents
# @see https://discord.com/developers/docs/topics/gateway#privileged-intents
UNPRIVILEGED_INTENTS = ALL_INTENTS & ~(INTENTS[:server_members] | INTENTS[:server_presences])
UNPRIVILEGED_INTENTS = ALL_INTENTS & ~(INTENTS[:server_members] | INTENTS[:server_presences] | INTENTS[:server_message_content])

# No intents
NO_INTENTS = 0
Expand Down
Loading