Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #130 from commclassroom/nitro_scam_addition
Browse files Browse the repository at this point in the history
fix: add more Nitro scam definitions
  • Loading branch information
siddhant-khisty authored Dec 1, 2021
2 parents 28f00f1 + db93eef commit 75a6048
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Commands/restrictedWords.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const words = [
let csgo_scam = 'hello! i leave from cs:go and give all my inventory, the first three who send a trade';
let discord_scam1 = 'Yo, friend gave me a referral link to get Discord nitro for free';
let discord_scam2 = "Discord Nitro for Free - Steam Store";
let discord_scam3 = "3 months of Discord Nitro free from STEAM";
let discord_scam4 = "Free 3 months Discord Nitro";

module.exports = (client, callback) => {
client.on('message', message => {
Expand All @@ -62,9 +64,9 @@ module.exports = (client, callback) => {
return;
}

else if (message.content.toLowerCase().substring(0,86) === csgo_scam || message.content.toLowerCase().substring(0,65) === discord_scam1 || message.content.toLowerCase().substring(0,37) === discord_scam2) {
else if (message.content.toLowerCase().substring(0,86) === csgo_scam || message.content.toLowerCase().substring(0,65) === discord_scam1
|| message.content.toLowerCase().substring(0,37) === discord_scam2 || message.content.toLowerCase().substring(0,42) === discord_scam3 || message.content.toLowerCase().substring(0,28) === discord_scam4) {
message.delete();
}
});
};

0 comments on commit 75a6048

Please sign in to comment.