Giter VIP home page Giter VIP logo

Comments (6)

genzyy avatar genzyy commented on August 20, 2024 1

Hey, I have an idea to implement this. Let me know if I can work on it or is there a better way to do this,

const csgo_scam =
  "hello i leave from csgo and give all my inventory, the first 3 will get trade";

const csgo_res = csgo_scam.match(/csgo|trade|inventory/g);

console.log(csgo_res);

const ban_requirements = {
  csgo: 3, // [csgo, inventory, trade]
  discord1: 2, // [discord, nitro]
  discord2: 3, // [discord, nitro, steam]
  discord3: 3, // [discord, nitro, month]
  discord4: 3, // [referral, discord, nitro]
};

if (csgo_res.length === ban_requirements.csgo) {
  // message.delete();
  // or
  // ban(user);
  console.log("delete message");
}

// same for other scams ...
  • Line 2 matches given string with the given words using regex and returns all the words that matched.
  • So the returned array's length is same as number of words we matched, then its a scam message.

from classroom-monitor-bot.

github-actions avatar github-actions commented on August 20, 2024

Hello πŸ‘‹ Thank you very much for raising an issue πŸ™Œ The maintainers will get back to you soon for discussion over the issue! Thank you for your contributions. πŸš€

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord Server - we help and encourage each other to contribute to open source little and often πŸ€“ Any questions, let us know!

from classroom-monitor-bot.

Panquesito7 avatar Panquesito7 commented on August 20, 2024

Hey, I have an idea to implement this. Let me know if I can work on it or is there a better way to do this,

const csgo_scam =
  "hello i leave from csgo and give all my inventory, the first 3 will get trade";

const csgo_res = csgo_scam.match(/csgo|trade|inventory/g);

console.log(csgo_res);

const ban_requirements = {
  csgo: 3, // [csgo, inventory, trade]
  discord1: 2, // [discord, nitro]
  discord2: 3, // [discord, nitro, steam]
  discord3: 3, // [discord, nitro, month]
  discord4: 3, // [referral, discord, nitro]
};

if (csgo_res.length === ban_requirements.csgo) {
  // message.delete();
  // or
  // ban(user);
  console.log("delete message");
}

// same for other scams ...
  • Line 2 matches given string with the given words using regex and returns all the words that matched.
  • So the returned array's length is same as number of words we matched, then its a scam message.

Looks good! πŸš€ What do you think, @kaiwalyakoparkar, @SiddhantKhisty?

from classroom-monitor-bot.

siddhant-khisty avatar siddhant-khisty commented on August 20, 2024

Hey, I have an idea to implement this. Let me know if I can work on it or is there a better way to do this,

const csgo_scam =
  "hello i leave from csgo and give all my inventory, the first 3 will get trade";

const csgo_res = csgo_scam.match(/csgo|trade|inventory/g);

console.log(csgo_res);

const ban_requirements = {
  csgo: 3, // [csgo, inventory, trade]
  discord1: 2, // [discord, nitro]
  discord2: 3, // [discord, nitro, steam]
  discord3: 3, // [discord, nitro, month]
  discord4: 3, // [referral, discord, nitro]
};

if (csgo_res.length === ban_requirements.csgo) {
  // message.delete();
  // or
  // ban(user);
  console.log("delete message");
}

// same for other scams ...
  • Line 2 matches given string with the given words using regex and returns all the words that matched.
  • So the returned array's length is same as number of words we matched, then its a scam message.

Looks good! πŸš€ What do you think, @kaiwalyakoparkar, @SiddhantKhisty?

@Panquesito7 correct me if I'm wrong, but this looks like a solution for a different issue entirelyπŸ™‚
And we have solved the issue of scam links using becca bot

from classroom-monitor-bot.

kaiwalyakoparkar avatar kaiwalyakoparkar commented on August 20, 2024

Yeah @SiddhantKhisty I feel the same. I don't see any code which checks for updated message or similar. I might be wrong. @genzyy could you please explain it maybe?

from classroom-monitor-bot.

genzyy avatar genzyy commented on August 20, 2024

My bad!, I mistakenly added this code on a different issue than which I intended this solution for. Really sorry for that.

I aimed this solution for #138.

from classroom-monitor-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.