Class: Discorb::CategoryChannel

Inherits:
GuildChannel show all
Defined in:
lib/discorb/channel.rb

Instance Attribute Summary collapse

Attributes inherited from GuildChannel

#permission_overwrites, #position

Attributes inherited from Channel

#id, #name

Instance Method Summary collapse

Methods inherited from GuildChannel

#<=>, #==, #delete!, #guild, #inspect, #mention, #move, #parent, #to_s

Methods inherited from Channel

#==, #inspect, #type

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#channels -> Object (readonly)

Returns the value of attribute channels.



1006
1007
1008
# File 'lib/discorb/channel.rb', line 1006

def channels
  @channels
end

Instance Method Details

#create_news_channel(*args, **kwargs) -> Object



1034
1035
1036
# File 'lib/discorb/channel.rb', line 1034

def create_news_channel(*args, **kwargs)
  guild.create_news_channel(*args, parent: self, **kwargs)
end

#create_stage_channel(*args, **kwargs) -> Object



1038
1039
1040
# File 'lib/discorb/channel.rb', line 1038

def create_stage_channel(*args, **kwargs)
  guild.create_stage_channel(*args, parent: self, **kwargs)
end

#create_text_channel(*args, **kwargs) -> Object



1026
1027
1028
# File 'lib/discorb/channel.rb', line 1026

def create_text_channel(*args, **kwargs)
  guild.create_text_channel(*args, parent: self, **kwargs)
end

#create_voice_channel(*args, **kwargs) -> Object



1030
1031
1032
# File 'lib/discorb/channel.rb', line 1030

def create_voice_channel(*args, **kwargs)
  guild.create_voice_channel(*args, parent: self, **kwargs)
end

#news_channel -> Object



1018
1019
1020
# File 'lib/discorb/channel.rb', line 1018

def news_channel
  @channels.filter { |c| c.is_a? NewsChannel }
end

#stage_channels -> Object



1022
1023
1024
# File 'lib/discorb/channel.rb', line 1022

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

#text_channels -> Object



1010
1011
1012
# File 'lib/discorb/channel.rb', line 1010

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

#voice_channels -> Object



1014
1015
1016
# File 'lib/discorb/channel.rb', line 1014

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