diff options
| author | Matthieu Pignolet <matthieu@matthieu-dev.xyz> | 2024-11-13 08:11:08 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 08:11:08 +0400 |
| commit | 043f399a91df125eb03616a9f8011e4a06c4f881 (patch) | |
| tree | 5f657730718a7f871a5268fd1871dab658b1c548 | |
| parent | bb027f19a6fc68028f7d8fcf25ec6610afce9990 (diff) | |
| parent | 9b175cf5d354fc67be50527bf37477a02c3cccd3 (diff) | |
Merge pull request #15 from maxchrr/main
Hotfix: disable shoudReply in ignored channels
| -rw-r--r-- | autofeur_db/src/trie.rs | 2 | ||||
| -rw-r--r-- | discordjs/src/index.mjs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/autofeur_db/src/trie.rs b/autofeur_db/src/trie.rs index 2359d2d..fbd392a 100644 --- a/autofeur_db/src/trie.rs +++ b/autofeur_db/src/trie.rs @@ -125,7 +125,7 @@ impl<'a> Trie<'a> { .iter() .nth(weighted.sample(&mut rng)) .expect("choosed value did not exist"); - println!("waling into node {}", key); + println!("walking into node {}", key); current_node = node; builder += key; diff --git a/discordjs/src/index.mjs b/discordjs/src/index.mjs index f1c942c..43ae9f2 100644 --- a/discordjs/src/index.mjs +++ b/discordjs/src/index.mjs @@ -59,7 +59,7 @@ const specialChannels = [ "995243987948544090" ] -const ignoredEveryoneChannels = [ +const ignoredChannels = [ "1055130476395909210" ] @@ -92,7 +92,7 @@ const messageAction = async (message, ctx) => { message.mentions.has(client.user) ); - if (shouldReply) { + if (shouldReply && !ignoredChannels.includes(message.channelId)) { let oldCounter = messageReplyCounter; if (shouldReplyByTimestamp || shouldReplyByCounter) { messageReplyCounter = 0; @@ -110,7 +110,7 @@ const messageAction = async (message, ctx) => { } } - if (message.content.includes("@everyone") && !ignoredEveryoneChannels.includes(message.channelId)) { + if (message.content.includes("@everyone") && !ignoredChannels.includes(message.channelId)) { message.reply("https://cdn.mpgn.dev/pascontent-gabe.gif"); } if (message.content.includes(" allo ")) { |
