Class: Discordrb::Member

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

Overview

A member is a user on a server. It differs from regular users in that it has roles, voice statuses and things like that.

Instance Attribute Summary

Attributes included from MemberAttributes

#deaf, #joined_at, #mute, #roles, #server, #voice_channel

Attributes inherited from User

#game, #status

Attributes included from UserAttributes

#avatar_id, #bot_account, #discriminator, #username

Attributes included from IDObject

#id

Instance Method Summary collapse

Methods included from PermissionCalculator

#defined_permission?, #permission?

Methods inherited from User

#await, #current_bot?, #on, #pm

Methods included from UserAttributes

#avatar_url, #distinct, #mention

Methods included from IDObject

#==, #creation_time

Instance Method Details

#inspectObject

Overwriting inspect for debug purposes



364
365
366
# File 'lib/discordrb/data.rb', line 364

def inspect
  "<Member user=#{@user.inspect} server=#{@server.inspect} joined_at=#{@joined_at} roles=#{@roles.inspect} voice_channel=#{@voice_channel.inspect} mute=#{@mute} deaf=#{@deaf} self_mute=#{@self_mute} self_deaf=#{@self_deaf}>"
end

#owner?true, false



337
338
339
# File 'lib/discordrb/data.rb', line 337

def owner?
  @server.owner == self
end