Class: Discorb::CategoryChannel

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

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

Methods included from ChannelContainer

#news_channels, #stage_channels, #text_channels, #voice_channels

Methods inherited from GuildChannel

#<=>, #==, #create_invite, #delete!, #delete_permissions, #fetch_invites, #guild, #inspect, #mention, #move, #parent, #set_permissions, #to_s

Methods inherited from Channel

#==, #inspect, #type

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Method Details

#channels -> Object



12
13
14
# File 'lib/discorb/channel/category.rb', line 12

def channels
  @client.channels.values.filter { |channel| channel.parent == self }
end

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



24
25
26
# File 'lib/discorb/channel/category.rb', line 24

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

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



28
29
30
# File 'lib/discorb/channel/category.rb', line 28

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

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



16
17
18
# File 'lib/discorb/channel/category.rb', line 16

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

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



20
21
22
# File 'lib/discorb/channel/category.rb', line 20

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