🐛 Fix voice channel cycle import

This commit is contained in:
Helloyunho 2021-04-04 19:11:56 +09:00
parent d829c91c3e
commit 6f4f06fd8b

View file

@ -5,7 +5,7 @@ import type { MemberPayload } from '../types/guild.ts'
import { Permissions } from '../utils/permissions.ts'
import { SnowflakeBase } from './base.ts'
import type { Guild } from './guild.ts'
import { VoiceChannel } from './guildVoiceChannel.ts'
import type { VoiceChannel } from './guildVoiceChannel.ts'
import type { Role } from './role.ts'
import type { User } from './user.ts'
@ -88,7 +88,7 @@ export class Member extends SnowflakeBase {
deaf: data.deaf,
mute: data.mute,
channel_id:
data.channel instanceof VoiceChannel ? data.channel.id : data.channel
typeof data.channel === 'string' ? data.channel : data.channel?.id
}
const res = await this.client.rest.patch(