File tree Expand file tree Collapse file tree 6 files changed +24
-20
lines changed Expand file tree Collapse file tree 6 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,24 @@ class GuildInviteManager extends CachedManager {
4545 */
4646
4747 /**
48- * Data that can be resolved to a channel that an invite can be created on. This can be:
48+ * A guild channel where an invite may be created on. This can be:
4949 * - TextChannel
5050 * - VoiceChannel
5151 * - AnnouncementChannel
5252 * - StageChannel
5353 * - ForumChannel
5454 * - MediaChannel
55+ *
56+ * @typedef {TextChannel|VoiceChannel|AnnouncementChannel|StageChannel|ForumChannel|MediaChannel }
57+ * GuildInvitableChannel
58+ */
59+
60+ /**
61+ * Data that can be resolved to a guild channel where an invite may be created on. This can be:
62+ * - GuildInvitableChannel
5563 * - Snowflake
56- *
57- * @typedef {TextChannel|VoiceChannel|AnnouncementChannel|StageChannel|ForumChannel|MediaChannel |Snowflake }
64+ *
65+ * @typedef {GuildInvitableChannel |Snowflake }
5866 * GuildInvitableChannelResolvable
5967 */
6068
@@ -98,8 +106,9 @@ class GuildInviteManager extends CachedManager {
98106
99107 /**
100108 * Fetches invite(s) from Discord.
101- *
102- * @param {InviteResolvable|FetchInviteOptions|FetchInvitesOptions } [options] Options for fetching guild invite(s)
109+ *
110+ * @param {GuildInviteResolvable|FetchInviteOptions|FetchInvitesOptions } [options]
111+ * Options for fetching guild invite(s)
103112 * @returns {Promise<GuildInvite|Collection<string, GuildInvite>> }
104113 * @example
105114 * // Fetch all invites from a guild
Original file line number Diff line number Diff line change @@ -6,14 +6,13 @@ const { Base } = require('./Base.js');
66/**
77 * The base invite class.
88 * @extends {Base }
9- * @abstract
109 */
1110class BaseInvite extends Base {
1211 constructor ( client , data ) {
1312 super ( client ) ;
1413
1514 /**
16- * The type of this invite
15+ * The type of this invite.
1716 * @type {InviteType }
1817 */
1918 this . type = data . type ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class GroupDMInvite extends BaseInvite {
2020 if ( 'channel' in data ) {
2121 /**
2222 * The channel this invite is for.
23- * @type {?BaseChannel }
23+ * @type {?PartialGroupDMChannel }
2424 */
2525 this . channel =
2626 this . client . channels . _add ( data . channel , null , { cache : false } ) ??
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class GuildInvite extends BaseInvite {
5757 if ( 'channel' in data ) {
5858 /**
5959 * The channel this invite is for.
60- * @type {?BaseChannel }
60+ * @type {?GuildInvitableChannel }
6161 */
6262 this . channel =
6363 this . client . channels . _add ( data . channel , this . guild , { cache : false } ) ??
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ function resolveCode(data, regex) {
3636}
3737
3838/**
39- * Resolves GuildInviteResolvable to an invite code.
39+ * Resolves InviteResolvable to an invite code.
4040 *
41- * @param {GuildInviteResolvable } data The invite resolvable to resolve
41+ * @param {InviteResolvable } data The invite resolvable to resolve
4242 * @returns {string }
4343 * @private
4444 */
Original file line number Diff line number Diff line change @@ -2005,7 +2005,7 @@ export class InteractionWebhook {
20052005 public fetchMessage ( message : Snowflake | '@original' ) : Promise < Message > ;
20062006}
20072007
2008- export abstract class BaseInvite < WithCounts extends boolean = boolean > extends Base {
2008+ export class BaseInvite < WithCounts extends boolean = boolean > extends Base {
20092009 protected constructor ( client : Client < true > , data : unknown ) ;
20102010 public readonly type : InviteType ;
20112011 public readonly code : string ;
@@ -6359,14 +6359,10 @@ export interface InviteGenerationOptions {
63596359 scopes : readonly OAuth2Scopes [ ] ;
63606360}
63616361
6362- export type GuildInvitableChannelResolvable =
6363- | AnnouncementChannel
6364- | ForumChannel
6365- | MediaChannel
6366- | Snowflake
6367- | StageChannel
6368- | TextChannel
6369- | VoiceChannel ;
6362+ export type GuildInvitableChannel =
6363+ AnnouncementChannel | ForumChannel | MediaChannel | TextChannel | VoiceChannel ;
6364+
6365+ export type GuildInvitableChannelResolvable = GuildInvitableChannel | Snowflake ;
63706366
63716367export interface InviteCreateOptions {
63726368 maxAge ?: number ;
You can’t perform that action at this time.
0 commit comments