Class: Discorb::CategoryChannel
Overview
Represents a category in a guild.
Instance Attribute Summary
Attributes inherited from GuildChannel
#permission_overwrites, #position
Attributes inherited from Channel
#id, #name
Instance Method Summary
collapse
#<=>, #==, #delete!, #guild, #inspect, #mention, #move, #parent, #to_s
Methods inherited from Channel
#==, #inspect, #type
#==, #eql?
Instance Method Details
#channels -> Object
1073
1074
1075
|
# File 'lib/discorb/channel.rb', line 1073
def channels
@client.channels.values.filter { |channel| channel.parent == self }
end
|
#create_news_channel(*args, **kwargs) -> Object
1101
1102
1103
|
# File 'lib/discorb/channel.rb', line 1101
def create_news_channel(*args, **kwargs)
guild.create_news_channel(*args, parent: self, **kwargs)
end
|
#create_stage_channel(*args, **kwargs) -> Object
1105
1106
1107
|
# File 'lib/discorb/channel.rb', line 1105
def create_stage_channel(*args, **kwargs)
guild.create_stage_channel(*args, parent: self, **kwargs)
end
|
#create_text_channel(*args, **kwargs) -> Object
1093
1094
1095
|
# File 'lib/discorb/channel.rb', line 1093
def create_text_channel(*args, **kwargs)
guild.create_text_channel(*args, parent: self, **kwargs)
end
|
#create_voice_channel(*args, **kwargs) -> Object
1097
1098
1099
|
# File 'lib/discorb/channel.rb', line 1097
def create_voice_channel(*args, **kwargs)
guild.create_voice_channel(*args, parent: self, **kwargs)
end
|
#news_channel -> Object
1085
1086
1087
|
# File 'lib/discorb/channel.rb', line 1085
def news_channel
channels.filter { |c| c.is_a? NewsChannel }
end
|
#stage_channels -> Object
1089
1090
1091
|
# File 'lib/discorb/channel.rb', line 1089
def stage_channels
channels.filter { |c| c.is_a? StageChannel }
end
|
#text_channels -> Object
1077
1078
1079
|
# File 'lib/discorb/channel.rb', line 1077
def text_channels
channels.filter { |c| c.is_a? TextChannel }
end
|
#voice_channels -> Object
1081
1082
1083
|
# File 'lib/discorb/channel.rb', line 1081
def voice_channels
channels.filter { |c| c.is_a? VoiceChannel }
end
|