Skip to content

Commit

Permalink
Allow for multiple channel_to_ignore values
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-huff committed Oct 23, 2024
1 parent d81a539 commit abb5a6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/discordBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ client.on("messageCreate", async (msg) => {
console.log(`${msg.author.username}: `, msg.content.toLowerCase());

switch (true) {
case new RegExp(`^\\b${process.env.BOT_TRIGGER}.*`, 'i').test(msg.content.toLowerCase()):
case new RegExp(`^\\b${process.env.BOT_TRIGGER}.*`, 'i').test(msg.content.toLowerCase()):fet
abbadabbabotSay(msg);
break;
case /^!engage_chat.*/i.test(msg.content.toLowerCase()):
Expand Down Expand Up @@ -176,7 +176,9 @@ client.on("voiceStateUpdate", (oldMember, newMember) => {
var users_to_ignore = process.env.USERS_TO_IGNORE
? process.env.USERS_TO_IGNORE.split(",")
: [];
var channel_to_ignore = [process.env.CHANNEL_TO_IGNORE];
var channel_to_ignore = process.env.CHANNEL_TO_IGNORE
? process.env.CHANNEL_TO_IGNORE.split(",")
: [];
var secondary_notification_only = [process.env.SECONDARY_NOTIFICATION_ONLY];
var notification_channel = client.channels.cache.get(
process.env.NOTIFICATION_CHANNEL
Expand Down

0 comments on commit abb5a6f

Please sign in to comment.