mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
fix: Use string instead of Snowflake for invites (#6202)
This commit is contained in:
@@ -23,7 +23,7 @@ class GuildInviteManager extends CachedManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The cache of this Manager
|
* The cache of this Manager
|
||||||
* @type {Collection<Snowflake, Invite>}
|
* @type {Collection<string, Invite>}
|
||||||
* @name GuildInviteManager#cache
|
* @name GuildInviteManager#cache
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class GuildInviteManager extends CachedManager {
|
|||||||
/**
|
/**
|
||||||
* Fetches invite(s) from Discord.
|
* Fetches invite(s) from Discord.
|
||||||
* @param {InviteResolvable|FetchInviteOptions|FetchInvitesOptions} [options] Options for fetching guild invite(s)
|
* @param {InviteResolvable|FetchInviteOptions|FetchInvitesOptions} [options] Options for fetching guild invite(s)
|
||||||
* @returns {Promise<Invite|Collection<Snowflake, Invite>>}
|
* @returns {Promise<Invite|Collection<string, Invite>>}
|
||||||
* @example
|
* @example
|
||||||
* // Fetch all invites from a guild
|
* // Fetch all invites from a guild
|
||||||
* guild.invites.fetch()
|
* guild.invites.fetch()
|
||||||
|
|||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -2351,7 +2351,7 @@ export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBan
|
|||||||
public remove(user: UserResolvable, reason?: string): Promise<User>;
|
public remove(user: UserResolvable, reason?: string): Promise<User>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildInviteManager extends DataManager<Snowflake, Invite, InviteResolvable> {
|
export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable> {
|
||||||
public constructor(guild: Guild, iterable?: Iterable<unknown>);
|
public constructor(guild: Guild, iterable?: Iterable<unknown>);
|
||||||
public guild: Guild;
|
public guild: Guild;
|
||||||
public create(channel: GuildChannelResolvable, options?: CreateInviteOptions): Promise<Invite>;
|
public create(channel: GuildChannelResolvable, options?: CreateInviteOptions): Promise<Invite>;
|
||||||
|
|||||||
Reference in New Issue
Block a user