Fazendaaa / LanguageMotherfucker

Telegram bot that warns and then ban users that won't speak in selected language.

Home Page:https://fazendaaa.github.io/LanguageMotherfucker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language Motherfucker

"Do you speak it?"




Say Thanks!

English README Portuguese README

Build Status codecov Codacy Badge Dependencies Known Vulnerabilities Maintainability

About

This bot was created with the intention of controlling groups that are only have a standard language to be used, telling users to have a talk only in the language and banishing them after three warnings. The advantage of using it is that administrators do not need to see the message all the time.

Besides that if a user who has been banned from another group for not speaking this language, when entering a new group will already receive a warning of bad behavior previously.

Ban System

When the user sends a non-standard message, he will receive a notification that in two other messages like this he will be banning.

The group administrator can choose between the bot to automatically delete the user or to be notified about this misbehavior, leaving the decision to ban or not to the user or even restart the counter for that user - if he thinks that it will be necessary.

Whitelist

In some cases, languages ​​like Portuguese have several branches, even though they are different between them, their speakers can understand each other. In this case, some users may get in a whitelist, preventing them from receiving warnings.

Supported Languages

Most bot translations were done using Google Translate, if you have any fluency in these languages, please consider correcting them if you see need or even adding a new one:

How to use it?

Artwork

All the arts made for this bot were based on the Pulp Fiction movie and the classic scene that can be checked here.

TODO

Since I will be keeping this README up to date with any major change and I don't use any versioning system to log all the fixed bugs or previous projects updates, you can still have a taste of what comes next and what is being under analysis right in the Projects tab.

Contributing

If you want to contribute to the bot, open a issue describing what you want to do, this is the best option since if such a change is necessary, you can implement it. Stay tuned just to follow code and tests standards.

If the change you want to make is not of interest to the bot, do not be discouraged, fork this project and make your own version of it. The MIT license gives you such possibility.

If you are the project or even make a PR that is approved, please be sure to put your name in CONTRIBUTORS.md file.

Built With

Code

Plain and simple Typescript and the Microsoft linter standards for it.

A important side note: "All functions that are assigned more than one parameter must have such parameters in an object."

No Relative Paths

If you want to add another source file, be sure to also add its relative path in tsconfig.json, jest.config.json and webpack.config.ts also.

Tests

Since there's a Travis CI integration and Codecov, please be mindful when writing new features to not break any of those that are already implemented. Only English tests are required.

All of the tests were written with Jest with the help of ts-jest.

To run all tests just:

npm test

If you ran into some errors related to package dependencies and want to know how to handle it, read the Security info.

Security

A integration with Snyk is present to ensure the Continuos Development (CD).

Errors/Bugs in Dependencies

When Snyk report some errors or bugs that can be fixed, just follow the CLI command to fix them before running -- more info at their docs.

Deploy

This bot is up and running at Heroku in a Docker container. You can also deploy yourself this bot into Heroku through:

Deploy

But if you use Azure:

Deploy to Azure

Or even deploy it in Docker Cloud:

Deploy to Docker Cloud

Authors

  • Only me for now.

Consider buy me a coffee:

Buy Me a Coffee

Or even becoming a patron:

Patreon

License

Like many Open-Source Software (OSS) the MIT license is used, more about it in LICENSE.

About

Telegram bot that warns and then ban users that won't speak in selected language.

https://fazendaaa.github.io/LanguageMotherfucker/

License:MIT License


Languages

Language:TypeScript 91.2%Language:HTML 6.2%Language:Dockerfile 2.6%