mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
fix: Added check on text channel permissions on intereactionCreate
This commit is contained in:
1 parent
b68b7dac95
commit
0c7a627e83
2 files changed
+36
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
const logger = require('../../services/logger');
|
||||
const { embedOptions, botOptions } = require('../../config');
|
||||
const { cannotSendMessageInChannel } = require('../../utils/validation/permissionValidator');
|
||||
const { Events, EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
@@ -10,6 +11,10 @@ module.exports = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (await cannotSendMessageInChannel(interaction)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
if (!command) {
|
||||
logger.warn(
|
||||
|
||||
Reference in new issue
Block a user