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?, #inspect
Instance Method Details
#channels -> Object
1107
1108
1109
|
# File 'lib/discorb/channel.rb', line 1107
def channels
@client.channels.values.filter { |channel| channel.parent == self }
end
|
#create_news_channel(*args, **kwargs) -> Object
1135
1136
1137
|
# File 'lib/discorb/channel.rb', line 1135
def create_news_channel(*args, **kwargs)
guild.create_news_channel(*args, parent: self, **kwargs)
end
|
#create_stage_channel(*args, **kwargs) -> Object
1139
1140
1141
|
# File 'lib/discorb/channel.rb', line 1139
def create_stage_channel(*args, **kwargs)
guild.create_stage_channel(*args, parent: self, **kwargs)
end
|
#create_text_channel(*args, **kwargs) -> Object
1127
1128
1129
|
# File 'lib/discorb/channel.rb', line 1127
def create_text_channel(*args, **kwargs)
guild.create_text_channel(*args, parent: self, **kwargs)
end
|
#create_voice_channel(*args, **kwargs) -> Object
1131
1132
1133
|
# File 'lib/discorb/channel.rb', line 1131
def create_voice_channel(*args, **kwargs)
guild.create_voice_channel(*args, parent: self, **kwargs)
end
|
#news_channel -> Object
1119
1120
1121
|
# File 'lib/discorb/channel.rb', line 1119
def news_channel
channels.filter { |c| c.is_a? NewsChannel }
end
|
#stage_channels -> Object
1123
1124
1125
|
# File 'lib/discorb/channel.rb', line 1123
def stage_channels
channels.filter { |c| c.is_a? StageChannel }
end
|
#text_channels -> Object
1111
1112
1113
|
# File 'lib/discorb/channel.rb', line 1111
def text_channels
channels.filter { |c| c.is_a? TextChannel }
end
|
#voice_channels -> Object
1115
1116
1117
|
# File 'lib/discorb/channel.rb', line 1115
def voice_channels
channels.filter { |c| c.is_a? VoiceChannel }
end
|