Class: Discorb::ThreadChannel::Member
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::ThreadChannel::Member
- Defined in:
- lib/discorb/channel/thread.rb
Overview
Represents a member in a thread.
Instance Attribute Summary collapse
-
#joined_at -> Object
readonly
Returns the value of attribute joined_at.
Instance Method Summary collapse
- #id -> Object
-
#initialize(client, data, guild_id) -> Member
constructor
A new instance of Member.
- #inspect -> Object
- #member -> Object
- #thread -> Object
- #user -> Object
Methods inherited from DiscordModel
Constructor Details
#initialize(client, data, guild_id) -> Member
Returns a new instance of Member.
319 320 321 322 323 324 325 |
# File 'lib/discorb/channel/thread.rb', line 319 def initialize(client, data, guild_id) @client = client @thread_id = data[:id] @user_id = data[:user_id] @joined_at = Time.iso8601(data[:join_timestamp]) @guild_id = guild_id end |
Instance Attribute Details
#joined_at -> Object (readonly)
Returns the value of attribute joined_at.
317 318 319 |
# File 'lib/discorb/channel/thread.rb', line 317 def joined_at @joined_at end |
Instance Method Details
#id -> Object
335 336 337 |
# File 'lib/discorb/channel/thread.rb', line 335 def id @user_id end |
#inspect -> Object
343 344 345 |
# File 'lib/discorb/channel/thread.rb', line 343 def inspect "#<#{self.class} id=#{@id.inspect}>" end |
#member -> Object
331 332 333 |
# File 'lib/discorb/channel/thread.rb', line 331 def member @client.guilds[@guild_id].members[@user_id] end |
#thread -> Object
327 328 329 |
# File 'lib/discorb/channel/thread.rb', line 327 def thread @client.channels[@thread_id] end |
#user -> Object
339 340 341 |
# File 'lib/discorb/channel/thread.rb', line 339 def user @client.users[@user_id] end |