Handling modal submissions

What Is the correct way to handle modals?

https://github.com/MRDGH2821/Perpetual-Mechanical-Array-Bot/blob/rewrite-sapphire/src/baseBot/commands/confess.ts#L207

I tried this way, but the logs throw Unknown Interaction error. So I definitely know this is incorrect way to do.
I just want to know the proper way to do this.

I don't want to create a separate interaction handler just for modal as all the required logic exists inside that same command file

  "dependencies": { 
     "@sapphire/decorators""^6.0.0", 
     "@sapphire/discord.js-utilities""^6.0.4", 
     "@sapphire/framework""^4.2.2", 
     "@sapphire/pieces""^3.6.1", 
     "@sapphire/plugin-logger""^3.0.2", 
     "@sapphire/plugin-subcommands""^4.0.0", 
     "@sapphire/ratelimits""^2.4.6", 
     "@sapphire/time-utilities""^1.7.9", 
     "@sapphire/utilities""^3.11.0", 
     "colorette""^2.0.19", 
     "discord-api-types""^0.37.37", 
     "discord.js""^14.9.0", 
     "firebase-admin""^11.6.0", 
     "yaspr""^1.0.2"
GitHub
Discord Bot for Traveler Mains Server. Contribute to MRDGH2821/Perpetual-Mechanical-Array-Bot development by creating an account on GitHub.
Perpetual-Mechanical-Array-Bot/confess.ts at rewrite-sapphire · MRD...
Was this page helpful?