Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editChannel): fix videoQualityMode & add permissionOverwrites #1319

Merged
merged 5 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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