class Discordrb::Events::ChannelRecipientEvent

Generic subclass for recipient events (add/remove)

Attributes

channel[R]

@return [Channel] the channel in question.

recipient[R]

@return [Recipient] the recipient that was added/removed from the group

Public Class Methods

new(data, bot) click to toggle source
# File lib/discordrb/events/channels.rb, line 135
def initialize(data, bot)
  @bot = bot

  @channel = bot.channel(data['channel_id'].to_i)
  recipient = data['user']
  recipient_user = bot.ensure_user(recipient)
  @recipient = Discordrb::Recipient.new(recipient_user, @channel, bot)
end