I'm trying to create a swear filter for a Discord bot (using the [Discordie](https://github.com/qeled/discordie "Discordie library") library), and I've tried two scripts (both which don't work properly)

```
var swear = ["swear1", "swear2"]
bot.Dispatcher.on(Event.MESSAGE_CREATE, e => {
    if (e.message.content == swear) {
        e.message.delete();
    }

```

None of the swear words are blocked in the script, so it's like the script doesn't even exist.

I also tried this:

```
var swear = ["swear1", "swear2"]
bot.Dispatcher.on(Event.MESSAGE_CREATE, e => {
    var found = false;
    for(var i = 0; i < vendors.length; i++) {
        if (vendors[i].e.message.content == swear) {
            found = true;
            e.message.delete();
        }
    }
});

```

Neither of these work, so I'm not sure what to try now. Any suggestions/changes I should make?