Error with modals

Hello, I just want to create 2 modal which shows one by one but I got this error:
Error showing modal: TypeError: interaction.showModal is not a function
at show_modal_two (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\events\applications.js:153:27)
at Object.execute (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\events\applications.js:33:27)
at Client.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\bot.js:34:44)
at Client.emit (node:events:536:35)
at InteractionCreateAction.handle (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\node_modules\@discordjs\ws\dist\index.js:1190:51)
(node:20648) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
Error showing modal: TypeError: interaction.showModal is not a function
at show_modal_two (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\events\applications.js:153:27)
at Object.execute (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\events\applications.js:33:27)
at Client.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\bot.js:34:44)
at Client.emit (node:events:536:35)
at InteractionCreateAction.handle (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\tivon\OneDrive\Документи\GitHub\uMineBot\node_modules\discord.js\node_modules\@discordjs\ws\dist\index.js:1190:51)
(node:20648) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
How to fix it?
2 Replies
d.js toolkit
d.js toolkit4w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Syjalo
Syjalo4w ago
You can't

Did you find this page helpful?