forked from snxraven/RavenAI
readding privacy code
This commit is contained in:
parent
55171efd7f
commit
806163e104
@ -12,9 +12,22 @@ client.on("interactionCreate", async (interaction) => {
|
||||
if (interaction.commandName === 'advanced'){
|
||||
console.log("Modal detected, skipping...")
|
||||
} else {
|
||||
// If not, defer and wait for edits - Max 15 Minutes!
|
||||
// Send defer depending on what the user has their privacy set to
|
||||
await interaction.deferReply({ ephemeral: false }).catch(() => { });
|
||||
// Process and Parse Data
|
||||
let dataToProcess = JSON.stringify(commandData[0])
|
||||
let parsedData = JSON.parse(dataToProcess)
|
||||
|
||||
// If the command is private, set ephemeral true else, set false
|
||||
if (parsedData.private == true) {
|
||||
await interaction.deferReply({
|
||||
ephemeral: true
|
||||
}).catch(() => {});
|
||||
|
||||
} else {
|
||||
await interaction.deferReply({
|
||||
ephemeral: false
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get command info
|
||||
|
Loading…
Reference in New Issue
Block a user