Class: Discordrb::Recipient

Inherits:
User
  • Object
show all
Includes:
MemberAttributes
Defined in:
lib/discordrb/data.rb

Overview

Recipients are members on private channels - they exist for completeness purposes, but all the attributes will be empty.

Instance Attribute Summary collapse

Attributes included from MemberAttributes

#joined_at, #nick, #roles, #server

Attributes inherited from User

#game, #status, #stream_type, #stream_url

Attributes included from UserAttributes

#avatar_id, #bot_account, #discriminator, #username

Attributes included from IDObject

#id

Instance Method Summary collapse

Methods inherited from User

#await, #await!, #current_bot?, #on, #pm, #send_file, #webhook?

Methods included from UserAttributes

#avatar_url, #distinct, #mention

Methods included from IDObject

#==, #creation_time, synthesise

Instance Attribute Details

#channelChannel (readonly)

Returns the private channel this recipient is the recipient of.

Returns:

  • (Channel)

    the private channel this recipient is the recipient of.



773
774
775
# File 'lib/discordrb/data.rb', line 773

def channel
  @channel
end

Instance Method Details

#inspectObject

Overwriting inspect for debug purposes



793
794
795
# File 'lib/discordrb/data.rb', line 793

def inspect
  "<Recipient user=#{@user.inspect} channel=#{@channel.inspect}>"
end