Module: Discorb::ChannelContainer

Included in:
CategoryChannel, Guild
Defined in:
lib/discorb/channel/container.rb

Overview

Module for container of channels.

Instance Method Summary collapse

Instance Method Details

#news_channels -> Array<Discorb::NewsChannel>

Returns news channels.

Returns:



31
32
33
# File 'lib/discorb/channel/container.rb', line 31

def news_channels
  channels.filter { |c| c.instance_of? NewsChannel }
end

#stage_channels -> Array<Discorb::StageChannel>

Returns stage channels.

Returns:



40
41
42
# File 'lib/discorb/channel/container.rb', line 40

def stage_channels
  channels.filter { |c| c.instance_of? StageChannel }
end

#text_channels -> Array<Discorb::TextChannel>

Returns text channels.

Returns:



13
14
15
# File 'lib/discorb/channel/container.rb', line 13

def text_channels
  channels.filter { |c| c.instance_of? TextChannel }
end

#voice_channels -> Array<Discorb::VoiceChannel>

Returns voice channels.

Returns:



22
23
24
# File 'lib/discorb/channel/container.rb', line 22

def voice_channels
  channels.filter { |c| c.instance_of? VoiceChannel }
end