Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
710f071
commit a83deef
Showing
6 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use strict"; | ||
|
||
const GuildChannel = require("./GuildChannel"); | ||
const Collection = require("../util/Collection"); | ||
|
||
/** | ||
* Represents a guild category channel | ||
* @extends GuildChannel | ||
* @prop {Collection<GuildChannel>?} channels A collection of guild channels that are part of this category | ||
*/ | ||
class CategoryChannel extends GuildChannel { | ||
constructor(data, guild) { | ||
super(data, guild); | ||
|
||
this.channels = new Collection(GuildChannel); | ||
|
||
guild.channels.forEach((channel) => { | ||
if(channel.parentID === this.id) { | ||
this.channels.add(channel); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = CategoryChannel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters