mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat(GuildManager): allow system channel flags in create (#5504)
This commit is contained in:
@@ -16,6 +16,7 @@ const {
|
|||||||
} = require('../util/Constants');
|
} = require('../util/Constants');
|
||||||
const DataResolver = require('../util/DataResolver');
|
const DataResolver = require('../util/DataResolver');
|
||||||
const Permissions = require('../util/Permissions');
|
const Permissions = require('../util/Permissions');
|
||||||
|
const SystemChannelFlags = require('../util/SystemChannelFlags');
|
||||||
const { resolveColor } = require('../util/Util');
|
const { resolveColor } = require('../util/Util');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -141,6 +142,7 @@ class GuildManager extends BaseManager {
|
|||||||
* @param {PartialRoleData[]} [options.roles] The roles for this guild,
|
* @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.
|
* 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 {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
|
* @param {VerificationLevel} [options.verificationLevel] The verification level for the guild
|
||||||
* @returns {Promise<Guild>} The guild that was created
|
* @returns {Promise<Guild>} The guild that was created
|
||||||
*/
|
*/
|
||||||
@@ -156,6 +158,7 @@ class GuildManager extends BaseManager {
|
|||||||
region,
|
region,
|
||||||
roles = [],
|
roles = [],
|
||||||
systemChannelID,
|
systemChannelID,
|
||||||
|
systemChannelFlags,
|
||||||
verificationLevel,
|
verificationLevel,
|
||||||
} = {},
|
} = {},
|
||||||
) {
|
) {
|
||||||
@@ -200,6 +203,7 @@ class GuildManager extends BaseManager {
|
|||||||
afk_channel_id: afkChannelID,
|
afk_channel_id: afkChannelID,
|
||||||
afk_timeout: afkTimeout,
|
afk_timeout: afkTimeout,
|
||||||
system_channel_id: systemChannelID,
|
system_channel_id: systemChannelID,
|
||||||
|
system_channel_flags: SystemChannelFlags.resolve(systemChannelFlags),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -2701,6 +2701,7 @@ declare module 'discord.js' {
|
|||||||
icon?: BufferResolvable | Base64Resolvable | null;
|
icon?: BufferResolvable | Base64Resolvable | null;
|
||||||
region?: string;
|
region?: string;
|
||||||
roles?: PartialRoleData[];
|
roles?: PartialRoleData[];
|
||||||
|
systemChannelFlags?: SystemChannelFlagsResolvable;
|
||||||
systemChannelID?: number;
|
systemChannelID?: number;
|
||||||
verificationLevel?: VerificationLevel | number;
|
verificationLevel?: VerificationLevel | number;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user