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

Update to v2.0, added punctuation support, added AllowedUsers, WhisperCooldown, EnableGenerateCommand, MinSentenceWordAmount and SentenceSeparator #17

Merged
merged 33 commits into from
Jul 27, 2021

Conversation

tomaarsen
Copy link
Owner

Pull request overview:

  • Punctuation (commas, dots, apostrophes, etc.) are now split as a separate word in the database.
  • Added AllowedUsers field - gives developer (or whichever users are specified here) the permission to bypass the cooldown, or use the generate command even when the command is disabled.
  • Added WhisperCooldown field - whether the Bot whispers the cooldown message. Otherwise, do not send the cooldown.
    • Still always whisper in certain situations, such as when the broadcaster updates the cooldown by whispering the Bot.
  • Added EnableGenerateCommand field - enables or disables !generate. Broadcaster and AllowerUsers can override this setting, and still generate.
  • Start a second sentence if the generated sentence is too short, uses a new MinSentenceWordAmount value in settings.json.
  • Added a SentenceSeparator value, which is placed inbetween sentences, when multiple sentences are generated (only when the first sentence was too short according to MinSentenceWordAmount)
  • Renamed settings.txt with settings.json, which is automatically updated from v1.0
  • Update the database according to the punctuation changes. This creates a ..._backup.db file with the old database.
  • Add a Tokenizer file that handles splitting up a sentence into tokens, and merging tokens back into sentences.
  • Improved README - removed troublesome HTML tags, improved readability, and added new fields in settings.
  • Modified default outputs slightly (e.g. after using !enable).
  • The default help Timer is now once every 5 hours, instead of off.
  • Added .gitignore.
  • Added typing to parameters in methods.
  • Added better docstrings to methods.
  • Improved code quality.

See #14 and #16.

Thanks to @justinrusso for the help.


  • Tom Aarsen

justinrusso and others added 30 commits June 13, 2021 16:47
Cleans up the args of the method
Merging wonderful changes from @justinrusso, with some updates. I'll create new PR's for each of the described updates.
I love the use of TypedDict to further improve third party type checking, but support for the commonly used Python 3.6 and 3.7 has priority.
Update the Settings class to include an automatic update
* Sometimes still send whispers, even if disabled in settings (in case of updating settings etc.)
* Rename check_if_streamer to check_if_permission
Git will attempt to push it, even if it's in .gitignore, because the default file is already on git. So, it's probably best to remove it from git, so people don't accidentally push their authentications.
Also improved efficiency of get_start in Database.py
- Punctuation (commas, dots, apostrophes, etc.) are now split as a separate word.
- Update the database accordingly. Create a ..._backup.db file with the old database.
- Automatically update the settings.json file
- Further improved code quality
- Add a Tokenizer file that handles splitting up a sentence into tokens, and merging tokens back into sentences.
- Added a SentenceSeparator value, which is placed inbetween sentences, when multiple sentences are generated (only when the first sentence was too short according to MinSentenceWordAmount)
@tomaarsen tomaarsen merged commit 30b0736 into master Jul 27, 2021
@tomaarsen tomaarsen deleted the updater_1 branch July 27, 2021 12:27
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.

2 participants