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

Profanity Filter v2 #137

Closed
wants to merge 12 commits into from
Closed

Conversation

MrDogeBro
Copy link
Contributor

@MrDogeBro MrDogeBro commented Dec 5, 2021

Currently under development.

Supercedes #44.
Closes #6.

@parafoxia
Copy link
Member

Looking at this, would it be possible to make this use the database to store the filter words instead?

@MrDogeBro
Copy link
Contributor Author

Possibly, however it would require a bit more work...what would be the benefit of doing so over just a json file like it was previously?

@parafoxia
Copy link
Member

It would make it easier to add and remove words. Unfortunately because this uses Docker, it's not as simple as putting a JSON file on the repo and expecting it to work, as any adaptations then couldn't be made through the bot.

But then of course there's the option of preloading the words and just working with those.

I guess process as you were for now, and we'll figure this out later. Theoretically a switch to database usage wouldn't be too difficult to achieve.

@MrDogeBro
Copy link
Contributor Author

Ok...but didn't like support v1 use a JSON file with Docker and it worked right?

@parafoxia
Copy link
Member

It's less whether it'd work right, and more that files in Docker volumes are difficult and annoying to deal with.

Also Support V1 used the JSON format as a memory dump basically lmao. It was far from ideal 😆

I think it should be fine as a file tbh. Provided it doesn't read the file every time it does a check, which I don't think it does.

@MrDogeBro
Copy link
Contributor Author

No if my memory is correct it does not. So getting the words from the DB could be easy enough. The only thing is that the easiest way to pass the words into content filter is via a JSON file in my opinion. However, if you'd like I should be able to make the words just get stored in the DB relatively easy, whichever you prefer.

@parafoxia
Copy link
Member

By the looks of things it only opens a file every time if we use the default words, which we won't be. So yeah just use a JSON for now, should be fine. If it turns out to be an issue then we'll make the switch to the database.

@MrDogeBro
Copy link
Contributor Author

Ok sounds good.

@parafoxia parafoxia mentioned this pull request Dec 5, 2021
@parafoxia
Copy link
Member

Closing as same behaviour can be achieved using the automod.

@parafoxia parafoxia closed this Sep 22, 2022
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

Successfully merging this pull request may close these issues.

Profanity Filter
2 participants