Skip to content

Commit

Permalink
Merge branch 'shardlab:main' into ban
Browse files Browse the repository at this point in the history
  • Loading branch information
Droid00000 authored Feb 17, 2025
2 parents 413d489 + cfce8ce commit e18d636
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/discordrb/data/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@ class Message
# @return [Integer, nil] the webhook ID that sent this message, or `nil` if it wasn't sent through a webhook.
attr_reader :webhook_id

# @return [Array<Component>]
# @return [Array<Component>] Interaction components for this message.
attr_reader :components

# @return [Integer] flags set on the message
# @return [Integer] flags set on the message.
attr_reader :flags

# @return [Channel, nil] The thread that was started from this message, or nil.
attr_reader :thread

# @!visibility private
def initialize(data, bot)
@bot = bot
Expand Down Expand Up @@ -160,7 +163,10 @@ def initialize(data, bot)

@components = []
@components = data['components'].map { |component_data| Components.from_data(component_data, @bot) } if data['components']

@flags = data['flags'] || 0

@thread = data['thread'] ? @bot.ensure_channel(data['thread'], @server) : nil
end

# Replies to this message with the specified content.
Expand Down

0 comments on commit e18d636

Please sign in to comment.