Skip to content

Commit

Permalink
fix(editChannel): fix videoQualityMode & add permissionOverwrites (
Browse files Browse the repository at this point in the history
  • Loading branch information
aicushman authored and abalabahaha committed Jun 8, 2022
1 parent 99b1376 commit ba4cb94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ declare namespace Eris {
topic?: string;
userLimit?: number;
}
interface EditChannelOptions extends Omit<CreateChannelOptions, "permissionOverwrites" | "reason"> {
interface EditChannelOptions extends Omit<CreateChannelOptions, "reason"> {
archived?: boolean;
autoArchiveDuration?: AutoArchiveDuration;
defaultAutoArchiveDuration?: AutoArchiveDuration;
Expand Down
6 changes: 4 additions & 2 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class Client extends EventEmitter {
* @arg {Number} [options.bitrate] The bitrate of the channel (voice channels only)
* @arg {Boolean} [options.nsfw] The nsfw status of the channel
* @arg {String?} [options.parentID] The ID of the parent category channel for this channel
* @arg {Array} [options.permissionOverwrites] An array containing permission overwrite objects
* @arg {Array<Object>} [options.permissionOverwrites] An array containing permission overwrite objects
* @arg {Number} [options.position] The sorting position of the channel
* @arg {Number} [options.rateLimitPerUser] The time in seconds a user has to wait before sending another message (does not affect bots or users with manageMessages/manageChannel permissions) (text channels only)
* @arg {String} [options.reason] The reason to be displayed in audit logs
Expand Down Expand Up @@ -1252,6 +1252,7 @@ class Client extends EventEmitter {
* @arg {Boolean} [options.nsfw] The nsfw status of the channel (guild channels only)
* @arg {String} [options.ownerID] The ID of the channel owner (group channels only)
* @arg {String?} [options.parentID] The ID of the parent channel category for this channel (guild text/voice channels only)
* @arg {Array<Object>} [options.permissionOverwrites] An array containing permission overwrite objects
* @arg {Number} [options.position] The sorting position of the channel (guild channels only)
* @arg {Number} [options.rateLimitPerUser] The time in seconds a user has to wait before sending another message (does not affect bots or users with manageMessages/manageChannel permissions) (guild text and thread channels only)
* @arg {String?} [options.rtcRegion] The RTC region ID of the channel (automatic if `null`) (guild voice channels only)
Expand Down Expand Up @@ -1279,7 +1280,8 @@ class Client extends EventEmitter {
rtc_region: options.rtcRegion,
topic: options.topic,
user_limit: options.userLimit,
voice_quality_mode: options.voiceQualityMode,
video_quality_mode: options.videoQualityMode,
permission_overwrites: options.permissionOverwrites,
reason: reason
}).then((channel) => Channel.from(channel, this));
}
Expand Down
1 change: 1 addition & 0 deletions lib/structures/GuildChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class GuildChannel extends Channel {
* @arg {String} [options.name] The name of the channel
* @arg {Boolean} [options.nsfw] The nsfw status of the channel
* @arg {Number?} [options.parentID] The ID of the parent channel category for this channel (guild text/voice channels only) or the channel ID where the thread originated from (thread channels only)
* @arg {Array<Object>} [options.permissionOverwrites] An array containing permission overwrite objects
* @arg {Number} [options.position] The sorting position of the channel
* @arg {Number} [options.rateLimitPerUser] The time in seconds a user has to wait before sending another message (does not affect bots or users with manageMessages/manageChannel permissions) (guild text and thread channels only)
* @arg {String?} [options.rtcRegion] The RTC region ID of the channel (automatic if `null`) (guild voice channels only)
Expand Down

0 comments on commit ba4cb94

Please sign in to comment.