EnzoLeClodo / Auto Claim Twitch Channel Bonus Points

// ==UserScript==
// @name         Auto Claim Twitch Channel Bonus Points
// @supportURL   https://openuserjs.org/scripts/EnzoLeClodo/Auto_Claim_Twitch_Channel_Bonus_Points/issues
// @description  Automaticly claims twitch channel bonus points
// @author       EnzoLeClodo
// @match        https://www.twitch.tv/*
// @grant        none
// @license      MIT
// ==/UserScript==

let AutoClaim = setInterval(() => {
  var box = document.querySelectorAll(".community-points-summary button");

  if (box.length > 1) {
    console.log("[AutoClaim] Claimed bonus points");
    box[1].click();
  }
}, 10000);

console.log("[AutoClaim] AutoClaim Initialized");