Class: Discordrb::VoiceRegion

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

Overview

Voice regions are the locations of servers that handle voice communication in Discord

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ VoiceRegion


499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/discordrb/data.rb', line 499

def initialize(data)
  @id = data['id']

  @name = data['name']

  @sample_hostname = data['sample_hostname']
  @sample_port = data['sample_port']

  @vip = data['vip']
  @optimal = data['optimal']
  @deprecated = data['deprecated']
  @custom = data['custom']
end

Instance Attribute Details

#customtrue, false (readonly)


497
498
499
# File 'lib/discordrb/data.rb', line 497

def custom
  @custom
end

#deprecatedtrue, false (readonly)


494
495
496
# File 'lib/discordrb/data.rb', line 494

def deprecated
  @deprecated
end

#idString (readonly) Also known as: to_s


475
476
477
# File 'lib/discordrb/data.rb', line 475

def id
  @id
end

#nameString (readonly)


479
480
481
# File 'lib/discordrb/data.rb', line 479

def name
  @name
end

#optimaltrue, false (readonly)


491
492
493
# File 'lib/discordrb/data.rb', line 491

def optimal
  @optimal
end

#sample_hostnameString (readonly)


482
483
484
# File 'lib/discordrb/data.rb', line 482

def sample_hostname
  @sample_hostname
end

#sample_portInteger (readonly)


485
486
487
# File 'lib/discordrb/data.rb', line 485

def sample_port
  @sample_port
end

#viptrue, false (readonly)


488
489
490
# File 'lib/discordrb/data.rb', line 488

def vip
  @vip
end