types(CategoryChannel): Ensure parent and parentId are null (#9327)

types: ensure categories' parents are `null`
This commit is contained in:
Jiralite
2023-04-13 17:10:53 +01:00
committed by GitHub
parent 7ff3d528d9
commit 8218ffc78d
2 changed files with 16 additions and 1 deletions

View File

@@ -8,9 +8,22 @@ const CategoryChannelChildManager = require('../managers/CategoryChannelChildMan
* @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.
* <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
* @memberof CategoryChannel
* @instance

View File

@@ -892,6 +892,8 @@ export type CategoryChannelType = Exclude<
export class CategoryChannel extends GuildChannel {
public get children(): CategoryChannelChildManager;
public type: ChannelType.GuildCategory;
public get parent(): null;
public parentId: null;
}
export type CategoryChannelResolvable = Snowflake | CategoryChannel;