Class: MijDiscord::Data::Recipient
- Defined in:
- lib/mij-discord/data/member.rb
Instance Attribute Summary collapse
-
#joined_at ⇒ Object
readonly
Returns the value of attribute joined_at.
-
#nickname ⇒ Object
(also: #nick)
readonly
Returns the value of attribute nickname.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Attributes inherited from User
#avatar_id, #bot, #bot_account, #discriminator, #extra, #game, #status, #username
Attributes included from IDObject
Instance Method Summary collapse
-
#initialize(user, channel, bot) ⇒ Recipient
constructor
A new instance of Recipient.
- #inspect ⇒ Object
Methods inherited from User
#avatar_url, #current_bot?, #distinct, #dnd?, #idle?, #invisible?, #member?, #mention, #offline?, #on, #online?, #pm, process_avatar, #send_file, #update_data, #update_presence, #webhook?
Methods included from IDObject
#==, #creation_time, #hash, synthesize, timestamp
Constructor Details
#initialize(user, channel, bot) ⇒ Recipient
Returns a new instance of Recipient.
159 160 161 162 163 164 165 166 167 168 |
# File 'lib/mij-discord/data/member.rb', line 159 def initialize(user, channel, bot) @bot, @channel, @user = bot, channel, user raise ArgumentError, 'Recipient for public channel' unless channel.private? super @user @mute = @deaf = @self_mute = @self_deaf = false @voice_channel, @server, @roles = nil, nil, [] @nickname, @joined_at = '', @channel.creation_time end |
Instance Attribute Details
#joined_at ⇒ Object (readonly)
Returns the value of attribute joined_at.
150 151 152 |
# File 'lib/mij-discord/data/member.rb', line 150 def joined_at @joined_at end |
#nickname ⇒ Object (readonly) Also known as: nick
Returns the value of attribute nickname.
152 153 154 |
# File 'lib/mij-discord/data/member.rb', line 152 def nickname @nickname end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
155 156 157 |
# File 'lib/mij-discord/data/member.rb', line 155 def roles @roles end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
157 158 159 |
# File 'lib/mij-discord/data/member.rb', line 157 def server @server end |
Instance Method Details
#inspect ⇒ Object
170 171 172 |
# File 'lib/mij-discord/data/member.rb', line 170 def inspect MijDiscord.make_inspect(self, :user, :joined_at) end |