Class: Discorb::ThreadChannel::Member
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::ThreadChannel::Member
- Defined in:
- lib/discorb/channel.rb
Instance Attribute Summary collapse
-
#joined_at -> Object
readonly
Returns the value of attribute joined_at.
Instance Method Summary collapse
- #id -> Object
-
#initialize(cilent, data) -> Member
constructor
A new instance of Member.
- #inspect -> Object
- #member -> Object
- #thread -> Object
- #user -> Object
Methods inherited from DiscordModel
Constructor Details
#initialize(cilent, data) -> Member
Returns a new instance of Member.
997 998 999 1000 1001 1002 |
# File 'lib/discorb/channel.rb', line 997 def initialize(cilent, data) @cilent = cilent @thread_id = data[:id] @user_id = data[:user_id] @joined_at = Time.iso8601(data[:join_timestamp]) end |
Instance Attribute Details
#joined_at -> Object (readonly)
Returns the value of attribute joined_at.
995 996 997 |
# File 'lib/discorb/channel.rb', line 995 def joined_at @joined_at end |
Instance Method Details
#id -> Object
[View source]
1012 1013 1014 |
# File 'lib/discorb/channel.rb', line 1012 def id @user_id end |
#inspect -> Object
[View source]
1020 1021 1022 |
# File 'lib/discorb/channel.rb', line 1020 def inspect "#<#{self.class} id=#{@id.inspect}>" end |
#member -> Object
[View source]
1008 1009 1010 |
# File 'lib/discorb/channel.rb', line 1008 def member thread && thread.members[@user_id] end |
#thread -> Object
[View source]
1004 1005 1006 |
# File 'lib/discorb/channel.rb', line 1004 def thread @client.channels[@thread_id] end |
#user -> Object
[View source]
1016 1017 1018 |
# File 'lib/discorb/channel.rb', line 1016 def user @cilent.users[@user_id] end |