Skip to content

Commit

Permalink
feat(GuildManager): allow system channel flags in create (#5504)
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Apr 30, 2021
1 parent 4866e26 commit d9fa180
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/managers/GuildManager.js
Expand Up @@ -16,6 +16,7 @@ const {
} = require('../util/Constants');
const DataResolver = require('../util/DataResolver');
const Permissions = require('../util/Permissions');
const SystemChannelFlags = require('../util/SystemChannelFlags');
const { resolveColor } = require('../util/Util');

/**
Expand Down Expand Up @@ -141,6 +142,7 @@ class GuildManager extends BaseManager {
* @param {PartialRoleData[]} [options.roles] The roles for this guild,
* the first element of this array is used to change properties of the guild's everyone role.
* @param {number} [options.systemChannelID] The ID of the system channel
* @param {SystemChannelFlagsResolvable} [options.systemChannelFlags] The flags of the system channel
* @param {VerificationLevel} [options.verificationLevel] The verification level for the guild
* @returns {Promise<Guild>} The guild that was created
*/
Expand All @@ -156,6 +158,7 @@ class GuildManager extends BaseManager {
region,
roles = [],
systemChannelID,
systemChannelFlags,
verificationLevel,
} = {},
) {
Expand Down Expand Up @@ -200,6 +203,7 @@ class GuildManager extends BaseManager {
afk_channel_id: afkChannelID,
afk_timeout: afkTimeout,
system_channel_id: systemChannelID,
system_channel_flags: SystemChannelFlags.resolve(systemChannelFlags),
},
})
.then(data => {
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -2701,6 +2701,7 @@ declare module 'discord.js' {
icon?: BufferResolvable | Base64Resolvable | null;
region?: string;
roles?: PartialRoleData[];
systemChannelFlags?: SystemChannelFlagsResolvable;
systemChannelID?: number;
verificationLevel?: VerificationLevel | number;
}
Expand Down

0 comments on commit d9fa180

Please sign in to comment.