Node.js 是否可以建立反垃圾邮件系统?

Node.js 是否可以建立反垃圾邮件系统?,node.js,bots,discord,discord.js,Node.js,Bots,Discord,Discord.js,因此,我打算创建一个反垃圾邮件系统,如果一个用户连续发送5条消息,中间有很小的延迟,我希望它能自动将它们静音1分钟,并显示一个嵌入,并有一个剩余时间字段,该字段在静音到期前用剩余的秒数对自己进行编辑 我怎样才能做到这一点 谢谢 注:我已经为静音用户设置了一个名为“静音”的角色。 < P>我会考虑使用这个词: 您使用的是socket.io还是express?这是一个不好用的模块;它的代码很差,不能按要求正确执行。 var anti_spam = require("discord-anti-spa

因此,我打算创建一个反垃圾邮件系统,如果一个用户连续发送5条消息,中间有很小的延迟,我希望它能自动将它们静音1分钟,并显示一个嵌入,并有一个剩余时间字段,该字段在静音到期前用剩余的秒数对自己进行编辑

我怎样才能做到这一点

谢谢


注:我已经为静音用户设置了一个名为“静音”的角色。

< P>我会考虑使用这个词:


您使用的是socket.io还是express?这是一个不好用的模块;它的代码很差,不能按要求正确执行。
var anti_spam = require("discord-anti-spam");
antispam(bot,
{
    warnBuffer: 3, //Maximum amount of messages allowed to send in the interval time before getting warned.
    maxBuffer: 5, // Maximum amount of messages allowed to send in the interval time before getting banned.
    interval: 1000, // Amount of time in ms users can send a maximum of the maxBuffer variable before getting banned.
    warningMessage: "stop spamming or I'll whack your head off.", // Warning message send to the user indicating they are going to fast.
    banMessage: "has been banned for spamming, anyone else?", // Ban message, always tags the banned user in front of it.
    maxDuplicatesWarning = 7; // Maximum amount of duplicate messages a user can send in a timespan before getting warned
    maxDuplicatesBan = 10; // Maximum amount of duplicate messages a user can send in a timespan before getting banned
});