wehmoen
DIAdiscord.js - Imagine an app
•Created by wehmoen on 1/2/2024 in #djs-questions
Some typescript error when updating components
Hello there 👋🏻
I created a bot that handles a component interaction - a button click.
OnClick I use ActionRowBuilder to create an updated row object and then send the update by using:
But unless I add a
@ts-ignore
above the updatedRow in the components array my TS won't compile - With the @ts-ignore
it not just only compiles - it also works. The buttons are disabled. Thisis the typehints my IDE (WebStorm) gives me:
This all happens directly in the event handler for InteractionCreate with this signature: async function handler(interaction: Interaction): Promise<any>
I am unsure if my handler signature is wrong or if this is actually something with the library. Could someone take a look?4 replies