fix(Channel): add default for destructured options (#6203)

This commit is contained in:
ckohen
2021-07-28 13:31:59 -07:00
committed by GitHub
parent 26ba0e1036
commit 68725476b3

View File

@@ -126,7 +126,7 @@ class Channel extends Base {
return ThreadChannelTypes.includes(this.type);
}
static create(client, data, guild, { allowUnknownGuild, fromInteraction }) {
static create(client, data, guild, { allowUnknownGuild, fromInteraction } = {}) {
if (!CategoryChannel) CategoryChannel = require('./CategoryChannel');
if (!DMChannel) DMChannel = require('./DMChannel');
if (!NewsChannel) NewsChannel = require('./NewsChannel');