bart-kneepkens / spellingcopbot Goto Github PK
View Code? Open in Web Editor NEWSpellingCop enforces custom spelling rules in Telegram chats
SpellingCop enforces custom spelling rules in Telegram chats
When a tag is or contains a trigger this should be ignored.
In 1.0.0
, all the code is condensed in one file. Some code (for example checking admin privileges) are repeated throughout the code. This should be refactored to adhere the KISS principle, and provide a clear working project with code spread over multiple files.
At this moment, the project structure is incomplete (type: executable) and is unable to use new dependencies or add unit tests.
See title. It will look more professional and will give a clearer overview of the existing rules.
I understand the bot somehow has to be able to recognize commands, which right now is presumably done by checking for a prepended '/'. However, this results in users being able to cheat the system by typing incorrect words, prepending their message with '/', and then blasting the message into the chat without being corrected because the bot ignores such messages. This seems like a flaw.
For example, let's say there is a rule that says that Pineapple should be replaced by Pepperoni, and Pizza should be corrected by Burger.
Some chat member writes: "I love pineapple on my pizza".
The current behaviour will reply to this message with: "I love Pepperoni on my pizza*".
The new behaviour should reply to this message with: "I love Pepperoni on my Burger*".
When posting the feedback for adding the rule change:
"Rule added 🎊 : [trigger]" to "Rule added 🎊 : [trigger] -> [correction]"
When the trigger word is said and the replacement sentence is posted by the bot, I suggest the trigger word to be strikedthrough and the correction word added in bold after the trigger word.
This looks better in my opinion, and also makes it look better when used together with other bots that have the robot emoji on the left side, such as DankTimesBot™.
Let the bot accept regex when a new spelling mistake is added
Currently, a group's rules are persisted in a file with the chat id as a name. If a group is upgraded to supergroup, the rules will therefore be lost.
The bot should rename the persistence file in this case.
An example: when you have a rule that corrects 'foo' to 'foo-bar', and a user sends 'foo-bar', then the bot corrects him with 'foo-bar'. This behavior seems incorrect.
For example, let's say there is a rule that says that Pineapple
should be replaced by Pepperoni
.
Some chat member writes: "I love pineapple on my pizza".
The current behaviour will reply to this message with: "Pepperoni*".
The new behaviour should reply to this message with: "I love Pepperoni on my pizza*"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.