Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple false positives #6

Open
cayoten opened this issue Apr 27, 2020 · 4 comments
Open

Multiple false positives #6

cayoten opened this issue Apr 27, 2020 · 4 comments

Comments

@cayoten
Copy link

cayoten commented Apr 27, 2020

There are tons of false positives being thrown, with emotes appearing to be one of the main causes. I’ve even had members say a single word in my server (hadn’t been on for hours), and they get flagged.

EDIT: The anti-spam even muted a member for sending a single image!

https://raimu.is-for.me/i/ao5pvewa.png

@mchccn
Copy link

mchccn commented Nov 20, 2020

well i'd just make my own anti-spam
discord.js provides everything you need to make it

@mchccn
Copy link

mchccn commented Nov 20, 2020

/* i use typescript btw */
const antispam = new Discord.Collection<string, string>();
/* ... */
client.on("message", async (message) => {
    if (!antispam.has(message.author.id)) {
        antispam.set(message.author.id, message.content);
        setTimeout(() => { antispam.delete(message.author.id); }, 5000);
    } else {
        message.delete();
    }
});

'course this is really simple and it would not scale well, but i use it sometimes for custom bots.

@mchccn
Copy link

mchccn commented Nov 20, 2020

Keep in mind that setTimeout is inaccurate, especially if we're doing asynchronous nodejs :/

@mchccn
Copy link

mchccn commented Nov 20, 2020

I realized that I am small brained and we could just use message.channel.awaitMessages(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants