Added ephemeral responses for the pasword generator

This commit is contained in:
Raven Scott
2022-09-28 14:48:15 -04:00
parent 7b8a015825
commit 398de1365c
2 changed files with 8 additions and 2 deletions

View File

@ -3,8 +3,13 @@ const client = require("../index");
client.on("interactionCreate", async (interaction) => {
// Slash Command Handling
if (interaction.isChatInputCommand()) {
await interaction.deferReply({ ephemeral: false }).catch(() => { });
console.log(interaction )
if (interaction.commandName == "password-generator") {
await interaction.deferReply({ ephemeral: true }).catch(() => { });
} else {
await interaction.deferReply({ ephemeral: false }).catch(() => { });
}
const cmd = client.slashCommands.get(interaction.commandName);
if (!cmd)
return interaction.followUp({ content: "An error has occurred " });