Class: MijDiscord::Data::ChannelCategory
- Defined in:
- lib/mij-discord/data/channel.rb
Constant Summary
Constants inherited from Channel
MijDiscord::Data::Channel::TYPES
Instance Attribute Summary
Attributes inherited from Channel
#bot, #cache, #name, #parent_id, #permission_overwrites, #position, #server, #type
Attributes included from IDObject
Instance Method Summary collapse
- #channels ⇒ Object (also: #children)
-
#initialize(data, bot, server) ⇒ ChannelCategory
constructor
A new instance of ChannelCategory.
- #update_data(data) ⇒ Object
Methods inherited from Channel
#category?, create, #default_channel?, #define_overwrite, #delete, #delete_overwrite, #group?, #member_overwrites, #mention, #parent, #pm?, #private?, #role_overwrites, #set_name, #set_options, #set_overwrites, #set_parent, #set_position, #sync_overwrites, #text?, #voice?
Methods included from IDObject
#==, #creation_time, #hash, synthesize
Constructor Details
#initialize(data, bot, server) ⇒ ChannelCategory
Returns a new instance of ChannelCategory.
436 437 438 |
# File 'lib/mij-discord/data/channel.rb', line 436 def initialize(data, bot, server) super(data, bot, server) end |
Instance Method Details
#channels ⇒ Object Also known as: children
444 445 446 |
# File 'lib/mij-discord/data/channel.rb', line 444 def channels @server.channels.select! {|x| x.parent_id == @id } end |
#update_data(data) ⇒ Object
440 441 442 |
# File 'lib/mij-discord/data/channel.rb', line 440 def update_data(data) super(data) end |