Skip to content

Commit

Permalink
Merge pull request #325 from dysolix/crypto-false-positive-fix
Browse files Browse the repository at this point in the history
Reduced common false positives
  • Loading branch information
Querijn authored Jun 16, 2024
2 parents f6a7e46 + 7a5b5b2 commit 0bec82d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpamKiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default class SpamKiller {

/** Checks if a user sends a messsage containing words related to crypto and triggers the bot check in that case */
checkForCryptoWords(message: Discord.Message) {
const cryptoWords = ["crypto", "blockchain", "web3", "nft", "$", "€", "bitcoin", "btc", "ethereum", "eth"];
const cryptoWords = ["crypto", "blockchain", "web3", " nft", "nft ", "$", "€", "bitcoin", " btc", "btc ", "ethereum", " eth", " eth"];
const mentionsCrypto = cryptoWords.some(word => message.content.toLowerCase().indexOf(word) !== -1);
if (!mentionsCrypto) return false;

Expand Down

0 comments on commit 0bec82d

Please sign in to comment.