mirror of
https://github.com/danbulant/discord.js
synced 2026-07-10 05:31:13 +00:00
Fix member.ban() and channel.clone() (#2241)
* Fix member.ban() * also fix channel.clone() * type is an option parameter in the new create * lint * better fix for clone
This commit is contained in:
parent
9eac19d9d8
commit
2249da464f
2 changed files with 3 additions and 3 deletions
|
|
@ -411,8 +411,8 @@ class GuildChannel extends Channel {
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
*/
|
*/
|
||||||
clone({ name = this.name, withPermissions = true, withTopic = true, reason } = {}) {
|
clone({ name = this.name, withPermissions = true, withTopic = true, reason } = {}) {
|
||||||
const options = { overwrites: withPermissions ? this.permissionOverwrites : [], reason };
|
const options = { overwrites: withPermissions ? this.permissionOverwrites : [], reason, type: this.type };
|
||||||
return this.guild.createChannel(name, this.type, options)
|
return this.guild.channels.create(name, options)
|
||||||
.then(channel => withTopic ? channel.setTopic(this.topic) : channel);
|
.then(channel => withTopic ? channel.setTopic(this.topic) : channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -543,7 +543,7 @@ class GuildMember extends Base {
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
ban(options) {
|
ban(options) {
|
||||||
return this.guild.ban(this, options);
|
return this.guild.members.ban(this, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue