GithubHelp home page GithubHelp logo

totesfleisch / enhanced-ttvdropbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giingu/enhanced-ttvdropbot

0.0 0.0 0.0 170.89 MB

Enhanced Twitch Drop Bot. Automaticlly Farms every Twitch Drop, Point & Subscription available like Rust for you and use custom channels

TypeScript 99.21% Nix 0.19% Batchfile 0.02% Dockerfile 0.53% Procfile 0.04%

enhanced-ttvdropbot's Introduction



Discord

Farms automatically Twitch Drops, Points & Subscriptions for you!

Deploy Deploy on Railway Deploy on Google Cloud Run on Repl.it Deploy to Render

Discord

Twitch has recently updated their drop claiming system, now including anti-bot detection. In the meantime, while the community finds a way to bypass it or new methods to claim them efficiently, we suggest you disable AutoClaim.

Don't worry, the bot will still farm the watch time; you will just need to manually claim them!

โ— UPDATE: We found a workaround!

๐Ÿฉน ๐Ÿกข Follow these steps carefully to bypass all issues

@PockySweet/Enhanced-TTVDropBot issues @PockySweet/Enhanced-TTVDropBot pull requests PockySweet/Enhanced-TTVDropBot requests
Discord


TTVDropBot

๐Ÿค” What is this Twitch Bot all about?

  • Makes your twitch drop experience as easy as possible.
  • No need to watch the stream in a browser, fully uses twitch inner gql.
  • No need to care about who is online and when.
  • Farm gifted subscriptions on any channel.
  • Saves your twitch session providing you autologin.
  • Collect endless points on your favorite channels.
  • Can watch every Twitch Drop / Campaign available.
  • Automatically claims your Drops.
  • Switches automatically to other games or drops if drop is claimed/claimable or offline.
  • Send Discord Webhooks to your server.
  • Host 24/7 on heroku.

๐Ÿ”Ž What is new in this enhanced version?

  • Added argument & flags for skipping channel points
  • Better designs, information and cooler readme ๐Ÿ˜Ž
  • Attached bypasses for automatic drop claiming & log-in errors below
  • New logs, webhook messages and removed useless ones causing cooldowns
  • Fixed the drop claiming crashes, now the bot will move to a new game instead
  • Modified the point claiming system slightly to mitigate some crashes

1๏ธโƒฃ๐Ÿ› ๏ธ Bypass anti-bot for autoclaim

  • How to automatically claim drops
    • Install Automatic Twitch on your browser
    • Goto twitch drops dashboard, Here
    • Make sure no extensions is able to kill the tab.
    • Leave the twitch tab open while TTVDropBot is running.

    • Automatic Twitch

2๏ธโƒฃ๐Ÿ› ๏ธ Work Around for Unable to log in

  • Follow these steps
    • Create a file called twitch-session.json under the same directory of the application
    • Paste this inside the file [{"name":"auth-token","value":"replaceme"}]
    • Goto twitch drops dashboard, Here
    • Get a browser addon that can look at cookies, ( Addons: Opera, Chrome, Firefox, Edge )
    • Copy the auth-token and replace replaceme from above with your token

    • Cookie Token
    • Save and close the editor you used then relaunch the bot.

โšก Installation

Docker

  1. Get the bot started

    docker run --rm -it ghcr.io/pockysweet/ttvdropbot/ttvdropbot:latest node ./build/index.js --displayless
  2. Get your token and then exit the bot with Ctrl + C

  • Go to twitch drops dashboard, Here
  • Get a browser addon that can look at cookies, ( Addons: Opera, Chrome, Firefox, Edge )
  • Copy the auth-token and replace TokenFromStep2 in step 3 with your token

    Cookie Token
    Use Token

    1. Create the container

      docker run -d --name ttvdropbot \
      -e ttvdropbot_displayless=true \
      -e ttvdropbot_token=TokenFromStep2 \
      -e ttvdropbot_games="Sea_of_Thieves Rust Lost_Ark No_Man's_Sky" \
      -e ttvdropbot_autoclaim=true \
      -e ttvdropbot_autopoints=false \
      ghcr.io/PockySweet/ttvdropbot/ttvdropbot:latest

    NPM+Git

    1. Install GIT on your computer
      Learn how to install it here

    2. Open a terminal (CMD, PowerShell, Shell)
      1.5 Clone the Repository using the following command.

      git clone https://github.com/PockySweet/Enhanced-TTVDropBot
    3. Install NPM packages.

      cd TTVDropBot/
      npm install
    4. Run the bot via npm scripts.

      npm run start:production
      OR
      npm run start:dev

    NPM Only

    1. Download the Repository & extract it on a folder
      You can download the latest version with the instructions on the image
      Or through our releases by clicking here

    How to download

    1. Open a console / terminal (CMD, PowerShell, Shell) and go to the location of the extracted folder.

      cd <paste here location of the folder>
    2. Install NPM packages by using the following command.

      npm install
    3. Run the bot via npm scripts with these commands.

      npm run start:production
      OR
      npm run start:dev

    ๐Ÿ“š How to use the Bot?

    Step by Step Usage: Twitch Drops

    1. Step

    Select the way you want to Log in into your twitch account.

    โš ๏ธ If you cant login directly because of CAPTCHA use the browser method. โš ๏ธ
    โš ๏ธ Only Chromium Browsers are supported like Brave and Chrome . โš ๏ธ

    Twitch Drops

    2. Step

    Select Twitch Drops to watch a Twitch Campaign or Custom Channels if you want to add your own channels. Refer to Step by Step Usage: Custom Channels for those.

    Twitch Drops

    3. Step

    Select the campaign you want to start watching. If you want to only watch certain campaign and not all refer to Settings: Priority list

    Twitch Drops

    4. Step

    Select the Drop you want to start watching.

    Twitch Drops

    5. Step

    ๐ŸŽ‰ Enjoy! You are successfully watching your drop.

    Twitch Drops

    Step by Step Usage: Custom Channels

    1. Step

    Select Custom Channels to start watching them.

    Twitch Drops

    2. Step

    Fill in the needed information to add a Channel. They can always be modified in the customchannel.json

    Twitch Drops

    3. Step

    Select the Channel you want to start. The bot will switch between the Custom Channels, if one goes offline.

    Twitch Drops

    4. Step

    ๐ŸŽ‰ Enjoy! You are successfully watching your Custom Channel.

    Twitch Drops

    Step by Step Usage: Heroku

    โš ๏ธ Only Recommended for advanced users. โš ๏ธ

    1. Step

    Click on the Deploy to Heroku Button at the top of the Readme

    Twitch Drops

    2. Step

    Login if necessary, and choose any app name you want, select your region and click Deploy app
    After that let Heroku go through the build process and then click on Manage App

    Twitch Drops

    3. Step

    Go to the Resources tab and disable the web dyno and enable the worker instead

    Twitch Drops

    4. Step

    Click on more in the top right corner and then on Run console.
    Type in bash and click Run.

    Twitch Drops

    5. Step

    Now run the command node ./build/index.js --showtoken in the Terminal.
    Login Directly via command Line, until you see your auth token and copy it.

    Twitch Drops

    6. Step

    Close the Terminal and go to Settings then Reveal Config Vars
    Now type in as key ttvdropbot_token and as value your copied token and click add
    You can find more environment variables here

    Twitch Drops

    7. Step

    ๐ŸŽ‰ Thats it Enjoy! You are successfully watching.
    To check if its working click on more in the top right corner then view logs.
    Give it some time to start up, and you should see the bot working.

    Twitch Drops


    ๐Ÿ“ Settings

    Down below you can find the settings Variables and what they do.

    Chromeexe

    • The path of your Browser: Linux: google-chrome | Windows: C:\Program Files\Google\Chrome\Application\chrome.exe

    UserDataPath

    • Providing a userdatapath, will give the loginpage the option to use cookies out of your browser. Option not really needed anymore.
    • You can find the UserdataPath under chrome://version then under Profile Path

    Webhook

    WebHookEvents

    • Set what events should be send via webhook.
    • Defaults to: ["requestretry", "claim", "newdrop", "offline", "newgame", "get", "getresult", "progress", "start", "error", "warn", "info"]

    Debug

    • Will log important values to the console for debugging.

    Displayless

    • Give the ability to use the bot fully automated with no user input needed. Especially useful for gui-less systems. See Ubuntu - No Gui

    ForceCustomChannel

    • Force the bot to watch Custom Channels, only useful for display-less mode.

    ProgressCheckInterval

    • The time in ms, in what interval the progress should be checked. Recommended is 60000 ms - 60 s anything under could cause twitch blocking your request.

    RetryDelay

    • The time in ms, in what interval failed requests should be retried. Recommended is 60000 ms - 60 s anything under could cause twitch blocking your request.

    WaitforChannels

    • If set to false the Bot will no longer wait 5 Minutes for new Channels to come online. It will switch to another game instead.

    Prioritylist

    • A list of Games the bot should watch / prioritize. Only Provide games with active Drop Campaigns in this Format: ["Rust","Fortnite", "Elite: Dangerous"]
    • You can get the valid name from: https://www.twitch.tv/directory
    • If provided the bot will only watch the games listed.

    AutoClaim

    • Allow the bot to autoClaim or not

    AutoPoints

    • Allow the bot to autoClaim points or not

    LogToFile

    • Log the Console to a file.

    UseKeepAlive

    • If activated uses Express to the keepalive the bot useful for stuff like Replit.


    โœ๏ธ Start Arguments

    All available start Arguments, basically everything which is also in the settings.json file.

    ./Enhanced-TTVDropBot.exe --help
    
    Usage: ./Enhanced-TTVDropBot or index.js --arg...
    
    Options:
    --help                              Show help. [boolean]
    --version                           Show version number. [boolean]
    -c, --chrome                        The path to your Chrome executable. [string]
    -u, --userdata                      The path to your userdata folder location. [string]
    --webhook, --wh                     The Discord Webhook URL. [string]
    --webhookevents                     Set what events should be send via webhook. [array]
    -i, --interval                      The progress interval in ms. [number]
    --retryinterval, --retry            The retry interval in ms. [number]
    -g, --games                         The Games the bot should watch. [array]
    --token                             Your twitch auth_token. [string]
    -d, --debug                         Enable Debug logging. [boolean]
    --displayless, --dl                 Enable Displayless mode. [boolean]
    --forcecustomchannel                Force Custom Channels. Only useful for
                                        display-less mode. [boolean]
    --waitforchannels, --waitonline     Disable waitforchannels, forcing the bot to not wait 
                                        for other channels with drops instead switch the game. [boolean]
    --autoclaim                         Enable auto claiming drops. [boolean]
    --autopoints                        Enable auto collection of points. [boolean]
    --log                               Enable logging to file. [boolean]
    --usekeepalive                      Enable Express KeepAlive. [boolean]
    --tray                              Start app in the tray. [boolean]
    
    Examples:
    --chrome C:path:to:chrome.exe             Sets your chrome path.
    --userdata C:path:to:userdata-folder      Sets your userdata path.
    --webhook https:discord.com:api:webh....  Sets your webhook url.
    --webhookevents requestretry claim        Defaults to the events in this
    newdrop offline newgame get getresult     example provided.
    progress start error warn info
    --interval 30000                          Sets the progress interval to 30s.
    --retryinterval 30000                     Sets the retry interval to 30s.
    --games Rust Krunker 'Elite: Dangerous'   Sets the Prioritylist to Rust,
    Krunker and Elite: Dangerous.
    --token yourkindalongtoken                Sets the your current twitch auth
                                              token, overwriting any in
                                              twitch-session.json.
    

    โœ๏ธ Environment variables

    All these Start Arguments also work as environment variable:

    ttvdropbot_chrome = YourPath
    ttvdropbot_userdata = YourPath
    ttvdropbot_webhook = DiscordWebhookURL
    ttvdropbot_interval = 60000
    ttvdropbot_games = Game1 Game2 Game3... โš ๏ธ Black Desert -> Black_Desert โš ๏ธ
    ttvdropbot_debug = true || false
    ttvdropbot_displayless = true || false
    ttvdropbot_forcecustomchannel = true || false
    ttvdropbot_waitforchannels = true || false
    ttvdropbot_autoclaim = true || false
    ttvdropbot_log = true || false
    ttvdropbot_usekeepalive = true || false
    ttvdropbot_retryinterval = 60000
    ttvdropbot_webhookevents = Event1 Event2 Event3...
    ttvdropbot_showtoken = true || false  Usefull for System were you cant access your twitch-session.json
    ttvdropbot_token = YourToken
    ttvdropbot_autopoints = true || false

    ๐Ÿ“˜ Adding Custom Channels


    Twitch Drops

    Name

    • The Name can be any String like Rainbow Six, Best Ch ever etc...

    Twitch Url

    • The Url is very important, never use the same Url twice, it has to be a valid Channel link and has always to start with https://www.twitch.tv/. Example for a Valid Url: https://www.twitch.tv/rainbow6tw

    How the Channel should be Watched

    Watch until the time runs out:

    • Watches the channel until the left time reaches 0 then switches to other custom channel.

    Watch indefinitely:

    • Watches the channel until it goes offline, then switches.

    Auto Points

    • Pretty simple, should the bot farm Points or not.

    Editing already Added Channel's

    • You can always edit Channel's which are already added in the CustomChannels.json.

    ๐Ÿ“„ Json Files Examples

    Example Settings.json

    {
       "Chromeexe": "",
       "UserDataPath": "",
       "WebHookURL": "",
       "WebHookEvents": [],
       "debug": false,
       "displayless": false,
       "ProgressCheckInterval": 60000,
       "RetryDelay": 60000,
       "WaitforChannels": true,
       "Prioritylist": [],
       "AutoClaim": true,
       "LogToFile": true,
       "ForceCustomChannel": false,
       "UseKeepAlive": false
       "AutoPoints": false,
    }

    Example CustomChannels.json

    [
      {
        "Name": "tarik",
        "TTVLink": "https://www.twitch.tv/tarik",
        "WatchType": "Watch until time runs out",
        "Time": "50"
      }
    ]

    Example Twitch Session

    [
      {
        "name": "auth-token",
        "value": "yourtoken"
      }
    ]

    โš ๏ธ Never share your Token with anyone, because it gives full access to your account โš ๏ธ


    ๐ŸŽ‰ Enjoy the bot and hopefully its helpful!

    GitHub's followers GitHub stars GitHub watchers GitHub forks

    If you like my work feel free to buy me a coffee. โ˜•

    "Buy Me A Coffee"

    Have fun and Enjoy! ๐Ÿ˜ƒ


    ๐Ÿฐ Contact

    Quickest Response:
    Discord Server: https://discord.gg/rV26FZ2upF

    Slow Response:
    Discord: - Vyper#1964

    Distributed under the MIT License. See LICENSE for more information.โš ๏ธ

    Modified with a lot of โค๏ธโค๏ธ by @PockySweet
    Log-in tutorial & claim switch by @cyberofficial
    Originally made by @Zarg

    enhanced-ttvdropbot's People

    Contributors

    pockysweet avatar zaarrg avatar aushick avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.