Alli
DIAdiscord.js - Imagine an app
•Created by Alli on 9/24/2023 in #djs-questions
await not behaving nicely after displaying a modal
Very silly question relating to async/await. After I display a modal, I collect the input using:
In the
if(submittedModal) {}
block, my await
commands no longer seem to work asynchronously. For example, I'm trying to make a call to a MySQL database based on the result of the modal (await connection.promise().query('select * ...)
, but it doesn't wait for the results of that query before barrelling on. Am I doing something wrong?20 replies