Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/structures/MessageMentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MessageMentions {

/**
* Cached channels for {@link MessageMentions#channels}
* @type {?Collection<Snowflake, GuildChannel>}
* @type {?Collection<Snowflake, Channel>}
* @private
*/
this._channels = null;
Expand Down Expand Up @@ -147,7 +147,7 @@ class MessageMentions {
/**
* Any channels that were mentioned
* <info>Order as they appear first in the message content</info>
* @type {Collection<Snowflake, GuildChannel>}
* @type {Collection<Snowflake, Channel>}
* @readonly
*/
get channels() {
Expand All @@ -164,7 +164,7 @@ class MessageMentions {
/**
* Checks if a user, guild member, role, or channel is mentioned.
* 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 {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
Expand Down
6 changes: 3 additions & 3 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1108,16 +1108,16 @@ declare module 'discord.js' {
roles: Snowflake[] | Collection<Snowflake, Role>,
everyone: boolean,
);
private _channels: Collection<Snowflake, GuildChannel> | null;
private _channels: Collection<Snowflake, Channel> | null;
private readonly _content: string;
private _members: Collection<Snowflake, GuildMember> | null;

public readonly channels: Collection<Snowflake, TextChannel>;
public readonly channels: Collection<Snowflake, Channel>;
public readonly client: Client;
public everyone: boolean;
public readonly guild: Guild;
public has(
data: UserResolvable | RoleResolvable | GuildChannelResolvable,
data: UserResolvable | RoleResolvable | ChannelResolvable,
options?: {
ignoreDirect?: boolean;
ignoreRoles?: boolean;
Expand Down