mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 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,
|
name: Events.InteractionCreate,
|
||||||
isDebug: false,
|
isDebug: false,
|
||||||
execute: async (interaction, { client }) => {
|
execute: async (interaction, { client }) => {
|
||||||
if (await cannotSendMessageInChannel(interaction)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const command = client.commands.get(interaction.commandName);
|
const command = client.commands.get(interaction.commandName);
|
||||||
if (!command) {
|
if (!command) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
@@ -34,6 +30,9 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
} else if (interaction.isChatInputCommand()) {
|
} else if (interaction.isChatInputCommand()) {
|
||||||
try {
|
try {
|
||||||
|
if (await cannotSendMessageInChannel(interaction)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const inputTime = new Date();
|
const inputTime = new Date();
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|||||||
Reference in new issue
Block a user