ModalBuilder in typescript #9094
-
Hi guys, I'm trying to use modal with discord.js V13 in typescript.
It's nearly the same as describe here: https://discordjs.guide/interactions/modals.html#building-and-responding-with-modals However, when I try to compile the code, I have the following error:
Can anyone give me some clues please? I can replace TextInputStyle.Short with integers but it's ugly... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The main error here is you are following the version 14 guide. You should follow the version 13 guide. Version 13 isn't nice with these constants. You'll have to import |
Beta Was this translation helpful? Give feedback.
The main error here is you are following the version 14 guide. You should follow the version 13 guide.
Version 13 isn't nice with these constants. You'll have to import
Constants
from discord.js and doConstants.TextInputStyles.SHORT
, in this case. Alternatively, you can update to version 14 where TypeScript usage is more familiar.