Skip to content

Commit

Permalink
Updating Interaction Handler
Browse files Browse the repository at this point in the history
- added: Create Developer Commands
  • Loading branch information
cptcr authored Jun 24, 2024
1 parent df2ecc8 commit e0fa289
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/events/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ module.exports = {
await command.execute(interaction, client)
}
} else {
await command.execute(interaction, client);

if (command.devOnly && process.env.OWNERID.includes(interaction.user.id)) {
await command.execute(interaction, client);
} else if (command.devOnly && !process.env.OWNERID.includes(interaction.user.id)) {
await interaction.reply({
content: "This command is a developer only command!",
ephemeral: true
})
} else {
await command.execute(interaction, client);
}
}
} catch (error) {
console.log(error);
Expand Down

0 comments on commit e0fa289

Please sign in to comment.