Skip to content

Bug: Interaction parameter on the Interaction Collector filter implicitly has an 'any' type #6573

@almeidx

Description

@almeidx

Issue description

Create a Message Component Collector and use the filter option. Notice how the interaction parameter is typed as any.

Codesample

import { Constants } from 'discord.js';

// Assuming 'msg' is a Message instance
const collector = msg.createMessageComponentCollector({
  componentType: Constants.MessageComponentTypes.BUTTON, // This does not make a difference currently
  filter: (i) => i.user.id === message.author.id, // Parameter 'i' implicitly has an 'any' type.
  time: 120e3,
});

discord.js version

13.2.0-dev.1630411689.d16ada9

Node.js version

16.8.0

Operating system

Manjaro Linux

Priority this issue should have

Low (slightly annoying)

Which partials do you have configured?

GUILD_MEMBER

Which gateway intents are you subscribing to?

GUILDS, GUILD_MEMBERS, GUILD_EMOJIS_AND_STICKERS, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGES

I have tested this issue on a development release

discord.js@13.2.0-dev.1630411689.d16ada9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions