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.



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

def channels
  @channels
end

Instance Method Details

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



1065
1066
1067
# File 'lib/discorb/channel.rb', line 1065

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

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



1069
1070
1071
# File 'lib/discorb/channel.rb', line 1069

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

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



1057
1058
1059
# File 'lib/discorb/channel.rb', line 1057

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

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



1061
1062
1063
# File 'lib/discorb/channel.rb', line 1061

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

#news_channel -> Object



1049
1050
1051
# File 'lib/discorb/channel.rb', line 1049

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

#stage_channels -> Object



1053
1054
1055
# File 'lib/discorb/channel.rb', line 1053

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

#text_channels -> Object



1041
1042
1043
# File 'lib/discorb/channel.rb', line 1041

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

#voice_channels -> Object



1045
1046
1047
# File 'lib/discorb/channel.rb', line 1045

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