-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
threads do not have permission overwrites (and linting)
- Loading branch information
1 parent
37e98c2
commit 842333f
Showing
6 changed files
with
64 additions
and
18 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 |
---|---|---|
@@ -1,12 +1,29 @@ | ||
"use strict"; | ||
|
||
const Collection = require("../util/Collection"); | ||
const GuildChannel = require("./GuildChannel"); | ||
const PermissionOverwrite = require("./PermissionOverwrite"); | ||
|
||
/** | ||
* Represents a store channel. See GuildChannel for more properties and methods. Bots cannot read or send messages in a store channel. | ||
* @prop {Collection<PermissionOverwrite>} permissionOverwrites Collection of PermissionOverwrites in this channel | ||
* @extends GuildChannel | ||
*/ | ||
class StoreChannel extends GuildChannel { | ||
constructor(data, client) { | ||
super(data, client); | ||
this.update(data); | ||
} | ||
|
||
update(data) { | ||
super.update(data); | ||
if(data.permission_overwrites) { | ||
this.permissionOverwrites = new Collection(PermissionOverwrite); | ||
data.permission_overwrites.forEach((overwrite) => { | ||
this.permissionOverwrites.add(overwrite); | ||
}); | ||
} | ||
} | ||
} | ||
|
||
module.exports = StoreChannel; |
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