Skip to content

Commit

Permalink
types(CategoryChannel): Ensure parent and parentId are null (#9327
Browse files Browse the repository at this point in the history
)

types: ensure categories' parents are `null`
  • Loading branch information
Jiralite committed Apr 13, 2023
1 parent 7ff3d52 commit 8218ffc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/discord.js/src/structures/CategoryChannel.js
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 8218ffc

Please sign in to comment.