Skip to content

Commit

Permalink
feature: add missing intents
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdie0 committed Oct 14, 2024
1 parent 840c533 commit 8520797
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/discordrb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ 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,
message_content: 1 << 15,
server_scheduled_events: 1 << 16,
auto_moderation_configuration: 1 << 20,
auto_moderation_execution: 1 << 21
}.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[:message_content])

# No intents
NO_INTENTS = 0
Expand Down

0 comments on commit 8520797

Please sign in to comment.