fix(MessageMentions#channels): Fix type of channels of mentions (#5370)

This commit is contained in:
GrapeColor
2021-04-15 07:34:13 +09:00
committed by GitHub
parent 32b0d71af7
commit 565d7b3747
2 changed files with 6 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ class MessageMentions {
/** /**
* Cached channels for {@link MessageMentions#channels} * Cached channels for {@link MessageMentions#channels}
* @type {?Collection<Snowflake, GuildChannel>} * @type {?Collection<Snowflake, Channel>}
* @private * @private
*/ */
this._channels = null; this._channels = null;
@@ -147,7 +147,7 @@ class MessageMentions {
/** /**
* Any channels that were mentioned * Any channels that were mentioned
* <info>Order as they appear first in the message content</info> * <info>Order as they appear first in the message content</info>
* @type {Collection<Snowflake, GuildChannel>} * @type {Collection<Snowflake, Channel>}
* @readonly * @readonly
*/ */
get channels() { get channels() {
@@ -164,7 +164,7 @@ class MessageMentions {
/** /**
* Checks if a user, guild member, role, or channel is mentioned. * Checks if a user, guild member, role, or channel is mentioned.
* Takes into account user mentions, role mentions, and @everyone/@here mentions. * Takes into account user mentions, role mentions, and @everyone/@here mentions.
* @param {UserResolvable|RoleResolvable|GuildChannelResolvable} data User/Role/Channel to check * @param {UserResolvable|RoleResolvable|ChannelResolvable} data User/Role/Channel to check
* @param {Object} [options] Options * @param {Object} [options] Options
* @param {boolean} [options.ignoreDirect=false] - Whether to ignore direct mentions to the item * @param {boolean} [options.ignoreDirect=false] - Whether to ignore direct mentions to the item
* @param {boolean} [options.ignoreRoles=false] - Whether to ignore role mentions to a guild member * @param {boolean} [options.ignoreRoles=false] - Whether to ignore role mentions to a guild member

6
typings/index.d.ts vendored
View File

@@ -1144,16 +1144,16 @@ declare module 'discord.js' {
roles: Snowflake[] | Collection<Snowflake, Role>, roles: Snowflake[] | Collection<Snowflake, Role>,
everyone: boolean, everyone: boolean,
); );
private _channels: Collection<Snowflake, GuildChannel> | null; private _channels: Collection<Snowflake, Channel> | null;
private readonly _content: string; private readonly _content: string;
private _members: Collection<Snowflake, GuildMember> | null; private _members: Collection<Snowflake, GuildMember> | null;
public readonly channels: Collection<Snowflake, TextChannel>; public readonly channels: Collection<Snowflake, Channel>;
public readonly client: Client; public readonly client: Client;
public everyone: boolean; public everyone: boolean;
public readonly guild: Guild; public readonly guild: Guild;
public has( public has(
data: UserResolvable | RoleResolvable | GuildChannelResolvable, data: UserResolvable | RoleResolvable | ChannelResolvable,
options?: { options?: {
ignoreDirect?: boolean; ignoreDirect?: boolean;
ignoreRoles?: boolean; ignoreRoles?: boolean;