mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
types(CategoryChannel): Ensure parent and parentId are null (#9327)
types: ensure categories' parents are `null`
This commit is contained in:
@@ -8,9 +8,22 @@ const CategoryChannelChildManager = require('../managers/CategoryChannelChildMan
|
|||||||
* @extends {GuildChannel}
|
* @extends {GuildChannel}
|
||||||
*/
|
*/
|
||||||
class CategoryChannel extends GuildChannel {
|
class CategoryChannel extends GuildChannel {
|
||||||
|
/**
|
||||||
|
* The id of the parent of this channel.
|
||||||
|
* @name CategoryChannel#parentId
|
||||||
|
* @type {null}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parent of this channel.
|
||||||
|
* @name CategoryChannel#parent
|
||||||
|
* @type {null}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the category parent of this channel.
|
* Sets the category parent of this channel.
|
||||||
* <warn>It is not currently possible to set the parent of a CategoryChannel.</warn>
|
* <warn>It is not possible to set the parent of a CategoryChannel.</warn>
|
||||||
* @method setParent
|
* @method setParent
|
||||||
* @memberof CategoryChannel
|
* @memberof CategoryChannel
|
||||||
* @instance
|
* @instance
|
||||||
|
|||||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -892,6 +892,8 @@ export type CategoryChannelType = Exclude<
|
|||||||
export class CategoryChannel extends GuildChannel {
|
export class CategoryChannel extends GuildChannel {
|
||||||
public get children(): CategoryChannelChildManager;
|
public get children(): CategoryChannelChildManager;
|
||||||
public type: ChannelType.GuildCategory;
|
public type: ChannelType.GuildCategory;
|
||||||
|
public get parent(): null;
|
||||||
|
public parentId: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CategoryChannelResolvable = Snowflake | CategoryChannel;
|
export type CategoryChannelResolvable = Snowflake | CategoryChannel;
|
||||||
|
|||||||
Reference in New Issue
Block a user