mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(GuildChannelManager): delete method accessing wrong id (#7771)
This commit is contained in:
@@ -435,7 +435,7 @@ class GuildChannelManager extends CachedManager {
|
|||||||
async delete(channel, reason) {
|
async delete(channel, reason) {
|
||||||
const id = this.resolveId(channel);
|
const id = this.resolveId(channel);
|
||||||
if (!id) throw new TypeError('INVALID_TYPE', 'channel', 'GuildChannelResolvable');
|
if (!id) throw new TypeError('INVALID_TYPE', 'channel', 'GuildChannelResolvable');
|
||||||
await this.client.api.channels(this.id).delete({ reason });
|
await this.client.api.channels(id).delete({ reason });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user