classroom-monitor-bot icon indicating copy to clipboard operation
classroom-monitor-bot copied to clipboard

[FEATURE] Remove warning message from the CM Bot when a user updates their message.

Open unnikrishnan2002 opened this issue 3 years ago β€’ 6 comments

Is your feature request related to a problem? Please describe.

The Bot gives warning when inclusive language is not used. But the warning message is not removed after the user updates their message accordingly.

Describe the solution you'd like

The Bot should remove the warning message after the user updates their message

Describe alternatives you've considered

No response

Additional context

No response

unnikrishnan2002 avatar Jan 01 '22 07:01 unnikrishnan2002

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!

github-actions[bot] avatar Jan 01 '22 07:01 github-actions[bot]

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.

rishitxyz avatar Feb 24 '22 13:02 rishitxyz

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 avatar Feb 24 '22 14:02 Panquesito7

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

siddhant-khisty avatar Feb 24 '22 15:02 siddhant-khisty

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?

kaiwalyakoparkar avatar Feb 24 '22 15:02 kaiwalyakoparkar

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.

rishitxyz avatar Feb 24 '22 18:02 rishitxyz