mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: don't run permission validation on autocomplete interactions
This commit is contained in:
1 parent
ef57c0d8dd
commit
fd6369169b
1 file changed
+3
-4
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user