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.


How to fix it?
Was this page helpful?