4.1.8 prevent command usage in non allowed channels

This commit is contained in:
SowinskiBraeden committed 2022-12-07 17:49:59 -08:00
1 parent b5211ad6bc
commit 8d010d336b
5 files changed
+14 -9

No files matched your search

+2
View File
@@ -21,6 +21,8 @@ module.exports = {
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }) => {
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id))
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
let available = new SelectMenuBuilder()
.setCustomId(`View-1-${interaction.member.user.id}`)