fix(GuildChannel): regression on default channel type (#5251)

This commit is contained in:
Souji
2021-03-28 15:24:41 +02:00
committed by GitHub
parent 1c8b1096c6
commit e7c4f3672e

View File

@@ -367,7 +367,7 @@ class GuildChannel extends Channel {
const newData = await this.client.api.channels(this.id).patch({
data: {
name: (data.name || this.name).trim(),
type: data.type ? ChannelTypes[data.type.toUpperCase()] : this.type,
type: ChannelTypes[data.type?.toUpperCase()],
topic: data.topic,
nsfw: data.nsfw,
bitrate: data.bitrate || this.bitrate,