Skip to content

Fix CloneAsync in DiscordChannel that was throwing a bad request.

Created by: Kiritsu

Summary

When we try to Clone a channel, the API will throw a 400 bad request because if the channel is a Text channel, CloneAsync will send 0 instead of null for UserLimit and Bitrate properties. Or, according to Discord API documentations, the values must only be sent in case the channel type is Voice.

Details

Simply create local variables in CloneAsync for Bitrate and UserLimit that will become null if the channel is not a Voice channel.

Merge request reports

Loading