class Discordrb::Recipient

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

Attributes

channel[R]

@return [Channel] the private channel this recipient is the recipient of.

Public Class Methods

new(user, channel, bot) click to toggle source

@!visibility private

Calls superclass method
# File lib/discordrb/data/recipient.rb, line 13
def initialize(user, channel, bot)
  @bot = bot
  @channel = channel
  raise ArgumentError, 'Tried to create a recipient for a public channel!' unless @channel.private?

  @user = user
  super @user

  # Member attributes
  @mute = @deaf = @self_mute = @self_deaf = false
  @voice_channel = nil
  @server = nil
  @roles = []
  @joined_at = @channel.creation_time
end

Public Instance Methods

inspect() click to toggle source

Overwriting inspect for debug purposes

# File lib/discordrb/data/recipient.rb, line 30
def inspect
  "<Recipient user=#{@user.inspect} channel=#{@channel.inspect}>"
end