Skip to content

Commit

Permalink
feature: add new intents and rename message content one
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdie0 committed Oct 14, 2024
1 parent 8520797 commit a285204
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/discordrb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ module Discordrb
direct_messages: 1 << 12,
direct_message_reactions: 1 << 13,
direct_message_typing: 1 << 14,
message_content: 1 << 15,
server_message_content: 1 << 15,
server_scheduled_events: 1 << 16,
auto_moderation_configuration: 1 << 20,
auto_moderation_execution: 1 << 21
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] | INTENTS[:message_content])
UNPRIVILEGED_INTENTS = ALL_INTENTS & ~(INTENTS[:server_members] | INTENTS[:server_presences] | INTENTS[:server_message_content])

# No intents
NO_INTENTS = 0
Expand Down

0 comments on commit a285204

Please sign in to comment.