forked from snxraven/DiscordJS-v14-Template
modal patch to interactionCreate
This commit is contained in:
parent
a31234b717
commit
26621c9866
@ -48,6 +48,10 @@ client.on("interactionCreate", async (interaction) => {
|
||||
let dataToProcess = JSON.stringify(commandData[0])
|
||||
let parsedData = JSON.parse(dataToProcess)
|
||||
|
||||
|
||||
if (interaction.commandName == "modal-example"){
|
||||
console.log("Modal - Skipping defer")
|
||||
} else {
|
||||
// If the command is private, set ephemeral true else, set false
|
||||
console.log(parsedData)
|
||||
if (parsedData.private == true) {
|
||||
@ -60,8 +64,7 @@ client.on("interactionCreate", async (interaction) => {
|
||||
ephemeral: false
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const cmd = client.slashCommands.get(interaction.commandName);
|
||||
if (!cmd)
|
||||
return interaction.followUp({
|
||||
|
Loading…
Reference in New Issue
Block a user