From 8d8ba2cd0de839df27b4137547d7c12c60aae6df Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Mon, 15 Feb 2021 20:28:58 +0100 Subject: [PATCH 01/13] Update README.md --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a02955a..8bd0861 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Read more about channels point [here](https://help.twitch.tv/s/article/channel-p - [Example](#example) 6. ๐Ÿช [Migrating from old repository (the original one)](#migrating-from-old-repository-the-original-one) 7. ๐ŸชŸ [Windows](#windows) -8. ๐Ÿ› [Issue / Debug](#issue--debug) +8. ๐Ÿ› [Contributing](#contributing) 9. โš ๏ธ [Disclaimer](#disclaimer) @@ -336,11 +336,7 @@ Other usefully infos can be founded here: You can also follow this [video tutorial](https://www.youtube.com/watch?v=0VkM7NOZkuA). ## Issue / Debug -When you open a new issue please use the correct **template**. -Please provide at least the following information/files: -- Operation System -- Python Version -- Log debug file `LoggerSettings(file_level=logging.DEBUG)` +Read [CONTRIBUTING.md](/CONTRIBUTING.md) Make sure also to have the latest commit. From 86b07d446dab892a202d3a16cefefbac32bc8593 Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Mon, 15 Feb 2021 20:30:55 +0100 Subject: [PATCH 02/13] Update README.md --- README.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8bd0861..f9377f9 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Read more about channels point [here](https://help.twitch.tv/s/article/channel-p - [Example](#example) 6. ๐Ÿช [Migrating from old repository (the original one)](#migrating-from-old-repository-the-original-one) 7. ๐ŸชŸ [Windows](#windows) -8. ๐Ÿ› [Contributing](#contributing) -9. โš ๏ธ [Disclaimer](#disclaimer) +8. โš ๏ธ [Disclaimer](#disclaimer) ## Community @@ -49,6 +48,8 @@ A coffee is always a sign of LOVE โค๏ธ Buy Me A Coffee +If you have any issue, or you want to contribute you are welcome! But please before read the [CONTRIBUTING.md](/CONTRIBUTING.md) + ## Main difference from the original repository: - Improve the logging @@ -335,10 +336,6 @@ Other usefully infos can be founded here: - https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/55 You can also follow this [video tutorial](https://www.youtube.com/watch?v=0VkM7NOZkuA). -## Issue / Debug -Read [CONTRIBUTING.md](/CONTRIBUTING.md) - -Make sure also to have the latest commit. ## Disclaimer This project comes with no gurantee or warranty. You are responsible for whatever happens from using this project. It is possible to get soft or hard banned by using this project if you are not careful. This is a personal project and is in no way affiliated with Twitch. From 0f0fdf2abea8d99f9337f68f6cb1bd718c2741fb Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Wed, 17 Feb 2021 23:16:11 +0100 Subject: [PATCH 03/13] Fix some typos # Description Fixed a couple of typos and changed main difference from original to main differences from original Fixes no issue ## Type of change Please delete options that are not relevant. Updated documentation # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration # Checklist: - [x] My changes generate no new warnings (no code has changed) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9377f9..ab8d4d5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Read more about channels point [here](https://help.twitch.tv/s/article/channel-p # README Contents 1. ๐Ÿค [Community](#community) -2. ๐Ÿš€ [Main difference from the original repository](#main-difference-from-the-original-repository) +2. ๐Ÿš€ [Main differences from the original repository](#main-differences-from-the-original-repository) 3. ๐Ÿงพ [Logs feature](#logs-feature) - [Full logs](#full-logs) - [Less logs](#less-logs) @@ -50,7 +50,7 @@ A coffee is always a sign of LOVE โค๏ธ If you have any issue, or you want to contribute you are welcome! But please before read the [CONTRIBUTING.md](/CONTRIBUTING.md) -## Main difference from the original repository: +## Main differences from the original repository: - Improve the logging - Final report with all the datas @@ -288,7 +288,7 @@ Here a concrete example: - **MOST_VOTED**: 21 Users have select **'over 7.5'**, instead of 9 'under 7.5' - **HIGH_ODDS**: The highest odd is 2.27 on **'over 7.5'** vs 1.79 on 'under 7.5' - **PERCENTAGE**: The highest percentage is 56% for **'under 7.5'** -- **SMART**: Calculate the percentage based on the users. The percentage are: 'over 7.5': 70% and 'under 7.5': 30%. If the difference between the two percatage are highter thant `percentage_gap` select the highest percentage, else the highest odds. +- **SMART**: Calculate the percentage based on the users. The percentages are: 'over 7.5': 70% and 'under 7.5': 30%. If the difference between the two percentages are higher than `percentage_gap` select the highest percentage, else the highest odds. In this case if percentage_gap = 20 ; 70-30 = 40 > percentage_gap, so the bot will select 'over 7.5' ### FilterCondition | Key | Type | Default | Description | From b9d1bc654c84a626bbba1992f564ee84ad749ae2 Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 03:23:09 +0200 Subject: [PATCH 04/13] Update CONTRIBUTING.md --- CONTRIBUTING.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53d635e..0e808ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,12 +22,12 @@ Fork with [GitHub Codespaces](https://github.com/features/codespaces): - [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally. ### Open a pull request -When you're done making changes and you'd like to propose them for review, use the [pull request template](#pull-request-template) to open your PR (pull request). +When you're done making changes, and you'd like to propose them for review, use the [pull request template](#pull-request-template) to open your PR (pull request). ### Submit your PR & get it reviewed -- Once you submit your PR, others users from the community will review it with you. The first thing you're going to want to do is a [self review](#self-review). -- After that, we may have questions, check back on your PR to keep up with the conversation. -- Did you have an issue, like a merge conflict? Check out our [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) on how to resolve merge conflicts and other issues. +- Once you submit your PR, other users from the community will review it with you. The first thing you're going to want to do is a [self review](#self-review). +- After that, we may have questions. Check back on your PR to keep up with the conversation. +- Did you have an issue, like a merge conflict? Check out our [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) on resolving merge conflicts and other issues. ### Your PR is merged! Congratulations! The whole GitHub community thanks you. :sparkles: @@ -53,10 +53,10 @@ Now that you're a part of the GitHub Docs community, you can keep participating - [Suggested changes](#suggested-changes) ## Types of contributions :memo: -You can contribute to the Twitch-Channel-Points-Miner-v2 in several ways. Bug reporting, pull request, propose new features, fork, donate and much more :muscle: . +You can contribute to the Twitch-Channel-Points-Miner-v2 in several ways. Bug reporting, pull request, propose new features, fork, donate, and much more :muscle: . ### :beetle: Issues -[Issues](https://docs.github.com/en/github/managing-your-work-on-github/about-issues) are used to report a bug, propose new features or ask for help. When you open a issue please use the appropriate template and lable. +[Issues](https://docs.github.com/en/github/managing-your-work-on-github/about-issues) are used to report a bug, propose new features, or ask for help. When you open an issue, please use the appropriate template and label. ### :hammer_and_wrench: Pull requests A [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) is a way to suggest changes in our repository. @@ -68,18 +68,18 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. -- The `bug` label if used when omething isn't working +- The `bug` label is used when something isn't working - The `documentation` label if used when you suggest improvements or additions to documentation (README.md update) -- The `duplicate` label if used when this issue or pull request already exists -- The `enhancement` label if used when you ask for / or propose new feature or request -- The `help wanted` if used when label when you need help for something +- The `duplicate` label is used when this issue or pull request already exists +- The `enhancement` label is used when you ask for / or propose a new feature or request +- The `help wanted` is used when labeling when you need help with something - The `improvements` label if used when you would suggest improvements on already existing features -- The `invalid` label if used for non-valid issue -- The `question` label if used for further information is requested +- The `invalid` label if used for a non-valid issue +- The `question` label, if used for further information is requested - The `wontfix` label if used if we will not work on it ## Opening a pull request -You can use the GitHub user interface :pencil2: for some small changes, like fixing a typo or updating a readme. You can also fork the repo and then clone it locally, to view changes and run your tests on your machine. +You can use the GitHub user interface :pencil2: for some small changes, like fixing a typo or updating a readme. You can also fork the repo and then clone it locally to view changes and run your tests on your machine. ### Self review You should always review your own PR first. @@ -97,7 +97,7 @@ For content changes, make sure that you: When you open a pull request, you must fill out the "Ready for review" template before we can review your PR. This template helps reviewers understand your changes and the purpose of your pull request. ### Python Styleguide -All Python code is linted with [Black](https://github.com/psf/black) using the default settings. Your code will not be accepted if it is not blackened. +All Python code is lined with [Black](https://github.com/psf/black) using the default settings. Your code will not be accepted if it is not blackened. You can use the pre-commit hook. ``` pip install pre-commit From 32922c7a720bf8add31bd4182349a636c2ff7de2 Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 03:26:51 +0200 Subject: [PATCH 05/13] Update CONTRIBUTING.md awww maaaaan --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e808ae..409bbcf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,14 +69,14 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. - The `bug` label is used when something isn't working -- The `documentation` label if used when you suggest improvements or additions to documentation (README.md update) +- The `documentation` label is used when you suggest improvements or additions to documentation (README.md update) - The `duplicate` label is used when this issue or pull request already exists - The `enhancement` label is used when you ask for / or propose a new feature or request - The `help wanted` is used when labeling when you need help with something -- The `improvements` label if used when you would suggest improvements on already existing features -- The `invalid` label if used for a non-valid issue -- The `question` label, if used for further information is requested -- The `wontfix` label if used if we will not work on it +- The `improvements` label is used when you would suggest improvements on already existing features +- The `invalid` label is used for a non-valid issue +- The `question` label, is used for further information is requested +- The `wontfix` label is used if we will not work on it ## Opening a pull request You can use the GitHub user interface :pencil2: for some small changes, like fixing a typo or updating a readme. You can also fork the repo and then clone it locally to view changes and run your tests on your machine. From 8deaeba11bcf6dcfb6f4188861dca7018d2fd47a Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 03:35:51 +0200 Subject: [PATCH 06/13] Update TwitchChannelPointsMiner.py ayo --- TwitchChannelPointsMiner/TwitchChannelPointsMiner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py b/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py index 1ef6ab1..156bdad 100644 --- a/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py +++ b/TwitchChannelPointsMiner/TwitchChannelPointsMiner.py @@ -66,7 +66,7 @@ class TwitchChannelPointsMiner: ): self.username = username - # Set as globally config + # Set as global config Settings.logger = logger_settings # Init as default all the missing values @@ -169,7 +169,7 @@ class TwitchChannelPointsMiner: # Populate the streamers with default values. # 1. Load channel points and auto-claim bonus - # 2. Check if streamers is online + # 2. Check if streamers are online # 3. Check if the user is a Streamer. In thi case you can't do prediction for streamer in self.streamers: time.sleep(random.uniform(0.3, 0.7)) @@ -263,7 +263,7 @@ class TwitchChannelPointsMiner: WebSocketsPool.handle_reconnection(self.ws_pool.ws[index]) def end(self, signum, frame): - logger.info("CTRL+C Detected! Please wait just a moments!") + logger.info("CTRL+C Detected! Please wait just a moment!") self.running = self.twitch.running = False self.ws_pool.end() From bba82af892e2472d9a94ff79d06062ef8ad3509b Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 03:39:24 +0200 Subject: [PATCH 07/13] Update WebSocketsPool.py lolz --- TwitchChannelPointsMiner/classes/WebSocketsPool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TwitchChannelPointsMiner/classes/WebSocketsPool.py b/TwitchChannelPointsMiner/classes/WebSocketsPool.py index 67349b0..247ed6f 100644 --- a/TwitchChannelPointsMiner/classes/WebSocketsPool.py +++ b/TwitchChannelPointsMiner/classes/WebSocketsPool.py @@ -32,7 +32,7 @@ class WebSocketsPool: """ API Limits - - Clients can listen on up to 50 topics per connection. Trying to listen on more topics will result in an error message. + - Clients can listen to up to 50 topics per connection. Trying to listen to more topics will result in an error message. - We recommend that a single client IP address establishes no more than 10 simultaneous connections. The two limits above are likely to be relaxed for approved third-party applications, as we start to better understand third-party requirements. """ @@ -124,7 +124,7 @@ class WebSocketsPool: # Reconnect only if ws.forced_close is False (replace the keep_running) # Set the current socket as reconnecting status - # So the exsternal ping check will be locked + # So the external ping check will be locked ws.is_reconneting = True if ws.forced_close is False: From 2a232353806b238fc10b8f5cb1b994d12a065dc6 Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 03:45:30 +0200 Subject: [PATCH 08/13] Update PULL_REQUEST_TEMPLATE.md Biggest typo the planet earth ever had. --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 22121ab..ea12473 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,13 +14,13 @@ Please delete options that are not relevant. # How Has This Been Tested? -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. # Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation (README.md) - [ ] My changes generate no new warnings - [ ] Any dependent changes have been updated in requirements.txt From 82e5c0127d3ea848ad6e7ed576411a92c4adddf5 Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 04:39:19 +0200 Subject: [PATCH 09/13] Update README.md I actually think this is the biggest typos/grammar fix yet --- README.md | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index f9377f9..5c97037 100644 --- a/README.md +++ b/README.md @@ -40,25 +40,25 @@ Read more about channels point [here](https://help.twitch.tv/s/article/channel-p ## Community -If you have any type of issue, you need help, or you just want to suggest a new feature please open a GitHub Issue. Don't write me on [Instagram](https://www.instagram.com/tkd_alex/), [Telegram](https://t.me/TkdAlex), [Discord](https://discordapp.com/users/641397388132483121), [Twitter](https://twitter.com/TkdAxel) (but you can follow me ๐Ÿ˜†) or somewhere else. If you don't have an account on this platform you can create, It's free. I do not want to be rude, but if you have a problem, maybe another user can have also the same problem and your issue can help the community. Same for the new feature, your idea can help other users, and It's beautiful to discuss between us. +If you have any type of issue, you need help, or you just want to suggest a new feature, please open a GitHub Issue. Don't write me on [Instagram](https://www.instagram.com/tkd_alex/), [Telegram](https://t.me/TkdAlex), [Discord](https://discordapp.com/users/641397388132483121), [Twitter](https://twitter.com/TkdAxel) (but you can follow me ๐Ÿ˜†) or somewhere else. If you don't have an account on this platform, you can create it. It's free. I do not want to be rude, but if you have a problem, maybe another user can also have the same problem, and your issue can help the community. Same for the new feature, your idea can help other users, and It's beautiful to discuss between us. -If you want to help on this project please leave a star ๐ŸŒŸ and share with your friends! ๐Ÿ˜Ž +If you want to help on this project, please leave a star ๐ŸŒŸ and share it with your friends! ๐Ÿ˜Ž A coffee is always a sign of LOVE โค๏ธ Buy Me A Coffee -If you have any issue, or you want to contribute you are welcome! But please before read the [CONTRIBUTING.md](/CONTRIBUTING.md) +If you have any issues or you want to contribute, you are welcome! But please before read the [CONTRIBUTING.md](/CONTRIBUTING.md) ## Main difference from the original repository: - Improve the logging -- Final report with all the datas +- Final report with all the data - Rewrite the entire code using classe instead of module with global variables -- Automatic download the followers list and use as input +- Automatic download the follower's list and use it as input - Better 'Watch Streak' strategy in priority system [#11](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/11) - Auto claim game drops from Twitch inventory [#21](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21) Read more about game drops [here](https://help.twitch.tv/s/article/mission-based-drops) -- Place the bet / make prediction and won or lose (๐Ÿ€) your channel points! +- Place the bet / make a prediction and win or lose (๐Ÿ€) your channel points! No browser needed. [#41](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/41) ([@lay295](https://github.com/lay295)) ## Logs feature @@ -178,13 +178,13 @@ from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, Streame twitch_miner = TwitchChannelPointsMiner( username="your-twitch-username", - claim_drops_startup=False, # If you want to auto claim all drops from Twitch inventory on startup + claim_drops_startup=False, # If you want to auto claim all drops from Twitch inventory on the startup logger_settings=LoggerSettings( - save=True, # If you want to save logs in file (suggested) + save=True, # If you want to save logs in a file (suggested) console_level=logging.INFO, # Level of logs - use logging.DEBUG for more info) - file_level=logging.DEBUG, # Level of logs - If you think the log file it's too big use logging.INFO - emoji=True, # On Windows we have a problem to print emoji. Set to false if you have a problem - less=False # If you think that the logs are too much verborse set this to True + file_level=logging.DEBUG, # Level of logs - If you think the log file it's too big, use logging.INFO + emoji=True, # On Windows, we have a problem printing emoji. Set to false if you have a problem + less=False # If you think that the logs are too verbose, set this to True ), streamer_settings=StreamerSettings( make_predictions=True, # If you want to Bet / Make prediction @@ -206,12 +206,12 @@ twitch_miner = TwitchChannelPointsMiner( ) ) -# You can customize the settings for each streamer. If not settings was provided the script will use the streamer_settings from TwitchChannelPointsMiner. -# If no streamer_settings provided in TwitchChannelPointsMiner the script will use default settings. +# You can customize the settings for each streamer. If not settings were provided, the script would use the streamer_settings from TwitchChannelPointsMiner. +# If no streamer_settings are provided in TwitchChannelPointsMiner the script will use default settings. # The streamers array can be a String -> username or Streamer instance. # The settings priority are: settings in mine function, settings in TwitchChannelPointsMiner instance, default settings. -# For example if in the mine function you don't provide any value for 'make_prediction' but you have set it on TwitchChannelPointsMiner instance the script will take the value from here. +# For example, if in the mine function you don't provide any value for 'make_prediction' but you have set it on TwitchChannelPointsMiner instance, the script will take the value from here. # If you haven't set any value even in the instance the default one will be used twitch_miner.mine( @@ -244,7 +244,7 @@ twitch_miner.mine(["streamer1", "streamer2"], followers=True) # Mixed ### Limits > Twitch has a limit - you can't watch more than 2 channels at one time. We take the first two streamers from the list as they have the highest priority. -Make sure to write the streamers array in order of priority from left to right. If you use `followers=True` Twitch return the streamers order by followed_at. So your last follow have the highest priority. +Make sure to write the streamers array in order of priority from left to right. If you use `followers=True` Twitch return the streamers order by followed_at. So your last follow has the highest priority. ## Settings @@ -254,15 +254,15 @@ Make sure to write the streamers array in order of priority from left to right. | `save` | bool | True | If you want to save logs in file (suggested) | | `less` | bool | False | Reduce the logging format and message verbosity [#10](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/10) | | `console_level` | level | logging.INFO | Level of logs in terminal - Use logging.DEBUG for more helpful messages. | -| `file_level` | level | logging.DEBUG | Level of logs in file save - If you think the log file it's too big use logging.INFO | -| `emoji` | bool | For Windows is False else True | On Windows we have a problem to print emoji. Set to false if you have a problem | +| `file_level` | level | logging.DEBUG | Level of logs in file save - If you think the log file it's too big, use logging.INFO | +| `emoji` | bool | For Windows is False else True | On Windows, we have a problem printing emoji. Set to false if you have a problem | ### StreamerSettings | Key | Type | Default | Description | |-------------------- |------------- |-------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `make_predictions` | bool | True | Choose if you want to make predictions / bet or not | | `follow_raid` | bool | True | Choose if you want to follow raid +250 points | -| `claim_drops` | bool | True | If this values is True the script will increase the watch-time for the current game. With this you are able to claim the drops from Twitch Inventory [#21](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21) | -| `watch_streak` | bool | True | Choose if you want to change priority for this streamers and try to catch the Watch Streak event [#11](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/11) | +| `claim_drops` | bool | True | If this value is True, the script will increase the watch-time for the current game. With this, you are able to claim the drops from Twitch Inventory [#21](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21) | +| `watch_streak` | bool | True | Choose if you want to change a priority for these streamers and try to catch the Watch Streak event [#11](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/11) | | `bet` | BetSettings | | Rules to follow for the bet | ### BetSettings | Key | Type | Default | Description | @@ -278,8 +278,8 @@ Make sure to write the streamers array in order of priority from left to right. - **MOST_VOTED**: Select the option most voted based on users count - **HIGH_ODDS**: Select the option with the highest odds -- **PERCENTAGE**: Select the option with the highest percentage based on odds (It's the same that show Twitch) - Should be the same of select LOWEST_ODDS -- **SMART**: If the majority in percent chose an option then follow the other users, otherwise choose the option with the highest odds +- **PERCENTAGE**: Select the option with the highest percentage based on odds (It's the same that show Twitch) - Should be the same as select LOWEST_ODDS +- **SMART**: If the majority in percent chose an option, then follow the other users, otherwise choose the option with the highest odds ![Screenshot](./assets/prediction.png) @@ -288,7 +288,7 @@ Here a concrete example: - **MOST_VOTED**: 21 Users have select **'over 7.5'**, instead of 9 'under 7.5' - **HIGH_ODDS**: The highest odd is 2.27 on **'over 7.5'** vs 1.79 on 'under 7.5' - **PERCENTAGE**: The highest percentage is 56% for **'under 7.5'** -- **SMART**: Calculate the percentage based on the users. The percentage are: 'over 7.5': 70% and 'under 7.5': 30%. If the difference between the two percatage are highter thant `percentage_gap` select the highest percentage, else the highest odds. +- **SMART**: Calculate the percentage based on the users. The percentage are: 'over 7.5': 70% and 'under 7.5': 30%. If the difference between the two percentages is higher than `percentage_gap` select the highest percentage, else the highest odds. In this case if percentage_gap = 20 ; 70-30 = 40 > percentage_gap, so the bot will select 'over 7.5' ### FilterCondition | Key | Type | Default | Description | @@ -310,15 +310,15 @@ Allowed values for `by` are: Allowed values for `where` are: `GT, LT, GTE, LTE` #### Example -- If you want to place the bet ONLY if the total of users participants in the bet are greater than 200 +- If you want to place the bet ONLY if the total of users participants in the bet is greater than 200 `FilterCondition(by=OutcomeKeys.TOTAL_USERS, where=Condition.GT, value=200)` -- If you want to place the bet ONLY if the winning odd of your decision is greater than or equal 1.3 +- If you want to place the bet ONLY if the winning odd of your decision is greater than or equal to 1.3 `FilterCondition(by=OutcomeKeys.ODDS, where=Condition.GTE, value=1.3)` -- If you want to place the bet ONLY if highest bet is lower than 2000 +- If you want to place the bet ONLY if the highest bet is lower than 2000 `FilterCondition(by=OutcomeKeys.TOP_POINTS, where=Condition.LT, value=2000)` -## Migrating from old repository (the original one): -If you already have a `twitch-cookies.pkl` and you don't want to login again please create a `cookies/` folder in the current directory and then copy the .pkl file with a new name `your-twitch-username.pkl` +## Migrating from an old repository (the original one): +If you already have a `twitch-cookies.pkl` and you don't want to login again, please create a `cookies/` folder in the current directory and then copy the .pkl file with a new name `your-twitch-username.pkl` ``` . +-- run.py @@ -331,11 +331,11 @@ Other users have find multiple problems on Windows my suggestion are: - Stop use Windows :stuck_out_tongue_closed_eyes: - Suppress the emoji in logs with `logger_settings=LoggerSettings(emoji=False)` -Other usefully infos can be founded here: +Other useful info can be founded here: - https://github.com/gottagofaster236/Twitch-Channel-Points-Miner/issues/31 - https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/55 You can also follow this [video tutorial](https://www.youtube.com/watch?v=0VkM7NOZkuA). ## Disclaimer -This project comes with no gurantee or warranty. You are responsible for whatever happens from using this project. It is possible to get soft or hard banned by using this project if you are not careful. This is a personal project and is in no way affiliated with Twitch. +This project comes with no guarantee or warranty. You are responsible for whatever happens from using this project. It is possible to get soft or hard banned by using this project if you are not careful. This is a personal project and is in no way affiliated with Twitch. From 7a8146b6d007ec691c57135c1b8c15d34385fa00 Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 04:39:44 +0200 Subject: [PATCH 10/13] Update example.py I copied a part from the README.md file since I was lazy doing the same work from this original file I hope I didn't cause any problems :/ --- example.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/example.py b/example.py index be6dc22..3bea1b7 100644 --- a/example.py +++ b/example.py @@ -8,13 +8,13 @@ from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, Streame twitch_miner = TwitchChannelPointsMiner( username="your-twitch-username", - claim_drops_startup=False, # If you want to auto claim all drops from Twitch inventory on startup + claim_drops_startup=False, # If you want to auto claim all drops from Twitch inventory on the startup logger_settings=LoggerSettings( - save=True, # If you want to save logs in file (suggested) + save=True, # If you want to save logs in a file (suggested) console_level=logging.INFO, # Level of logs - use logging.DEBUG for more info) - file_level=logging.DEBUG, # Level of logs - If you think the log file it's too big use logging.INFO - emoji=True, # On Windows we have a problem to print emoji. Set to false if you have a problem - less=False # If you think that the logs are too much verborse set this to True + file_level=logging.DEBUG, # Level of logs - If you think the log file it's too big, use logging.INFO + emoji=True, # On Windows, we have a problem printing emoji. Set to false if you have a problem + less=False # If you think that the logs are too verbose, set this to True ), streamer_settings=StreamerSettings( make_predictions=True, # If you want to Bet / Make prediction @@ -29,19 +29,19 @@ twitch_miner = TwitchChannelPointsMiner( stealth_mode=True, # If the calculated amount of channel points is GT the highest bet, place the highest value minus 1-2 points #33 filter_condition=FilterCondition( by=OutcomeKeys.TOTAL_USERS, # Where apply the filter. Allowed [PERCENTAGE_USERS, ODDS_PERCENTAGE, ODDS, TOP_POINTS, TOTAL_USERS, TOTAL_POINTS] - where=Condition.LTE, # The key must be [GT, LT, GTE, LTE] than value + where=Condition.LTE, # 'by' must be [GT, LT, GTE, LTE] than value value=800 ) ) ) ) -# You can customize the settings for each streamer. If not settings was provided the script will use the streamer_settings from TwitchChannelPointsMiner. -# If no streamer_settings provided in TwitchChannelPointsMiner the script will use default settings. +# You can customize the settings for each streamer. If not settings were provided, the script would use the streamer_settings from TwitchChannelPointsMiner. +# If no streamer_settings are provided in TwitchChannelPointsMiner the script will use default settings. # The streamers array can be a String -> username or Streamer instance. # The settings priority are: settings in mine function, settings in TwitchChannelPointsMiner instance, default settings. -# For example if in the mine function you don't provide any value for 'make_prediction' but you have set it on TwitchChannelPointsMiner instance the script will take the value from here. +# For example, if in the mine function you don't provide any value for 'make_prediction' but you have set it on TwitchChannelPointsMiner instance, the script will take the value from here. # If you haven't set any value even in the instance the default one will be used twitch_miner.mine( From 92052122a1be67948c28dfee24e2a3b34c2c426f Mon Sep 17 00:00:00 2001 From: kelukelol <76735490+kelukelol@users.noreply.github.com> Date: Thu, 18 Feb 2021 16:22:29 +0200 Subject: [PATCH 11/13] Update CONTRIBUTING.md Awww maaaaaaan --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 409bbcf..19a7f0e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,7 +97,7 @@ For content changes, make sure that you: When you open a pull request, you must fill out the "Ready for review" template before we can review your PR. This template helps reviewers understand your changes and the purpose of your pull request. ### Python Styleguide -All Python code is lined with [Black](https://github.com/psf/black) using the default settings. Your code will not be accepted if it is not blackened. +All Python code is formatted with [Black](https://github.com/psf/black) using the default settings. Your code will not be accepted if it is not blackened. You can use the pre-commit hook. ``` pip install pre-commit From 8a2f7c10174568fa323bce5403757308add8b3e6 Mon Sep 17 00:00:00 2001 From: Thomas Couchoud Date: Mon, 15 Feb 2021 14:08:35 +0100 Subject: [PATCH 12/13] Sort history keys when printing history --- TwitchChannelPointsMiner/classes/entities/Streamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TwitchChannelPointsMiner/classes/entities/Streamer.py b/TwitchChannelPointsMiner/classes/entities/Streamer.py index fdf22bb..3c2a464 100644 --- a/TwitchChannelPointsMiner/classes/entities/Streamer.py +++ b/TwitchChannelPointsMiner/classes/entities/Streamer.py @@ -112,7 +112,7 @@ class Streamer(object): return ", ".join( [ f"{key}({self.history[key]['counter']} times, {_millify(self.history[key]['amount'])} gained)" - for key in self.history + for key in sorted(self.history) if self.history[key]["counter"] != 0 ] ) From f0f9522c5fc7d208d08a11cac97deec87b8b182b Mon Sep 17 00:00:00 2001 From: Thomas Couchoud Date: Thu, 18 Feb 2021 18:21:27 +0100 Subject: [PATCH 13/13] Update README.md --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ef3d54f..fcd4363 100644 --- a/README.md +++ b/README.md @@ -149,18 +149,13 @@ No browser needed. [#41](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner Result: {'type': 'LOSE', 'won': 0} %d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username, channel_id=0000000, channel_points=67247), Total points gained (after farming - before farming): -7838 -%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ WATCH(35 times, 350 gained), CLAIM(11 times, 550 gained), PREDICTION(1 times, 6531 gained) -%d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username1, channel_id=0000000, channel_points=4240), Total points gained (after farming - before farming): 0 +%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ CLAIM(11 times, 550 gained), PREDICTION(1 times, 6531 gained), WATCH(35 times, 350 gained) %d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username2, channel_id=0000000, channel_points=61365), Total points gained (after farming - before farming): 977 -%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ WATCH(11 times, 132 gained), REFUND(1 times, 605 gained), CLAIM(4 times, 240 gained) -%d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username3, channel_id=0000000, channel_points=6815), Total points gained (after farming - before farming): 0 -%d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username4, channel_id=0000000, channel_points=16386), Total points gained (after farming - before farming): 0 +%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ CLAIM(4 times, 240 gained), REFUND(1 times, 605 gained), WATCH(11 times, 132 gained) %d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username5, channel_id=0000000, channel_points=25960), Total points gained (after farming - before farming): 1680 -%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ WATCH(53 times, 530 gained), CLAIM(17 times, 850 gained) +%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ CLAIM(17 times, 850 gained), WATCH(53 times, 530 gained) %d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username6, channel_id=0000000, channel_points=9430), Total points gained (after farming - before farming): 1120 -%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ WATCH(42 times, 420 gained), WATCH_STREAK(1 times, 450 gained), CLAIM(14 times, 700 gained) -%d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username7, channel_id=0000000, channel_points=2380), Total points gained (after farming - before farming): 0 -%d/%m/%y %H:%M:%S - ๐Ÿค– Streamer(username=streamer-username8, channel_id=0000000, channel_points=10230), Total points gained (after farming - before farming): 0 +%d/%m/%y %H:%M:%S - ๐Ÿ’ฐ CLAIM(14 times, 700 gained), WATCH(42 times, 420 gained), WATCH_STREAK(1 times, 450 gained) ``` ## How to use: