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.
| 270 271 272 273 274 275 276 | # File 'lib/discorb/channel/thread.rb', line 270 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.
| 268 269 270 | # File 'lib/discorb/channel/thread.rb', line 268 def joined_at @joined_at end | 
Instance Method Details
#id -> Object
| 286 287 288 | # File 'lib/discorb/channel/thread.rb', line 286 def id @user_id end | 
#inspect -> Object
| 294 295 296 | # File 'lib/discorb/channel/thread.rb', line 294 def inspect "#<#{self.class} id=#{@id.inspect}>" end | 
#member -> Object
| 282 283 284 | # File 'lib/discorb/channel/thread.rb', line 282 def member @client.guilds[@guild_id].members[@user_id] end | 
#thread -> Object
| 278 279 280 | # File 'lib/discorb/channel/thread.rb', line 278 def thread @client.channels[@thread_id] end | 
#user -> Object
| 290 291 292 | # File 'lib/discorb/channel/thread.rb', line 290 def user @client.users[@user_id] end |