fix: don't run permission validation on autocomplete interactions

This commit is contained in:
Marius Begby committed 2023-07-24 23:18:36 +02:00
1 parent ef57c0d8dd
commit fd6369169b
1 file changed
+3 -4
+3 -4
View File
@@ -7,10 +7,6 @@ module.exports = {
name: Events.InteractionCreate,
isDebug: false,
execute: async (interaction, { client }) => {
if (await cannotSendMessageInChannel(interaction)) {
return;
}
const command = client.commands.get(interaction.commandName);
if (!command) {
logger.warn(
@@ -34,6 +30,9 @@ module.exports = {
}
} else if (interaction.isChatInputCommand()) {
try {
if (await cannotSendMessageInChannel(interaction)) {
return;
}
const inputTime = new Date();
await interaction.deferReply();