fix: APPLICATION_MODAL type doesn't exist upon the discord-interactions (#24)

This commit is contained in:
Tarab1te
2024-07-26 14:10:04 -04:00
committed by GitHub
parent 62f3c90c6d
commit ae6b197475

View File

@@ -21,7 +21,7 @@ app.post('/interactions', verifyKeyMiddleware(process.env.PUBLIC_KEY), function
if (data.name === 'test') {
// Send a modal as response
return res.send({
type: InteractionResponseType.APPLICATION_MODAL,
type: InteractionResponseType.MODAL,
data: {
custom_id: 'my_modal',
title: 'Modal title',
@@ -60,7 +60,7 @@ app.post('/interactions', verifyKeyMiddleware(process.env.PUBLIC_KEY), function
/**
* Handle modal submissions
*/
if (type === InteractionType.APPLICATION_MODAL_SUBMIT) {
if (type === InteractionType.MODAL_SUBMIT) {
// custom_id of modal
const modalId = data.custom_id;
// user ID of member who filled out modal