Broken button handler: "interaction.isButton is not a function"

Discord.js npm version: 14.16.3
Node.js version: 20.9.0

Since yesterday I cant handle any interaction events where I check if the interaction is a button / chatinputcommand or modalsubmit interaction anymore (I only have these three). They are all build similar.

Here is my handleButtons code for the interactionCreate event:
import { mainLogger } from "../../config";
import { ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder, ModalActionRowComponentBuilder, ButtonInteraction } from "discord.js";

module.exports = async (interaction: ButtonInteraction) => {
    // Creating the logging Object for our command handler
    const buttonExecutionLoggingObj = { main: false, sub: true };
    const buttonExecutionLogger = mainLogger.getSubLogger({ name: "ButtonExecutionLogger" }, buttonExecutionLoggingObj);

    // Loglevel setting 0 = silly, 1 = trace, 2 = debug, 3 = info, 4 = warn, 5 = error, 6 = fatal
    buttonExecutionLogger.settings.minLevel = 2;

    buttonExecutionLogger.debug("Button execution started...");
    buttonExecutionLogger.debug("Interaction customId ", interaction.customId)

    // Check if the interaction is a command
    buttonExecutionLogger.debug(`Checking if the interaction is with a button...`);
    if (!interaction.isButton()) {
        buttonExecutionLogger.trace("Interaction is not with a button.");
        return;
    }

    // Doing things afterwards...

}


The error is attached as a screenshot because of discords text limitations.

If you need any more code or other information, please feel free to ask
image.png
Was this page helpful?