Skip to content

Commit

Permalink
fix(GuildManager): #create throws when systemChannelFlags is undefined (
Browse files Browse the repository at this point in the history
  • Loading branch information
iShibi committed Jun 12, 2021
1 parent c585933 commit 29173bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/managers/GuildManager.js
Expand Up @@ -188,6 +188,8 @@ class GuildManager extends BaseManager {
if (role.color) role.color = resolveColor(role.color);
if (role.permissions) role.permissions = Permissions.resolve(role.permissions).toString();
}
if (systemChannelFlags) systemChannelFlags = SystemChannelFlags.resolve(systemChannelFlags);

return new Promise((resolve, reject) =>
this.client.api.guilds
.post({
Expand All @@ -202,7 +204,7 @@ class GuildManager extends BaseManager {
afk_channel_id: afkChannelID,
afk_timeout: afkTimeout,
system_channel_id: systemChannelID,
system_channel_flags: SystemChannelFlags.resolve(systemChannelFlags),
system_channel_flags: systemChannelFlags,
},
})
.then(data => {
Expand Down

0 comments on commit 29173bf

Please sign in to comment.