Skip to content

Commit

Permalink
fix(GuildMemberManager): allow moving members to any non-text channel (
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyClausen committed Jun 2, 2021
1 parent 678b7da commit d21e6af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/managers/GuildMemberManager.js
Expand Up @@ -2,6 +2,7 @@

const BaseManager = require('./BaseManager');
const { Error, TypeError, RangeError } = require('../errors');
const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel');
const GuildMember = require('../structures/GuildMember');
const Role = require('../structures/Role');
const Collection = require('../util/Collection');
Expand Down Expand Up @@ -166,7 +167,7 @@ class GuildMemberManager extends BaseManager {
const _data = { ...data };
if (_data.channel) {
_data.channel = this.guild.channels.resolve(_data.channel);
if (!_data.channel || _data.channel.type !== 'voice') {
if (!(_data.channel instanceof BaseGuildVoiceChannel)) {
throw new Error('GUILD_VOICE_CHANNEL_RESOLVE');
}
_data.channel_id = _data.channel.id;
Expand Down

0 comments on commit d21e6af

Please sign in to comment.