Skip to content

Instantly share code, notes, and snippets.

@bleszerd
Created September 3, 2023 14:59
Show Gist options
  • Save bleszerd/b432bfe43c73e5fd1a68bd3216dedad6 to your computer and use it in GitHub Desktop.
Save bleszerd/b432bfe43c73e5fd1a68bd3216dedad6 to your computer and use it in GitHub Desktop.
Traz a paz para o chat
const THREE_MINUTES_IN_MILLIS = 177000;
const REWARD_NAME = "84|105|109|101|111|117|116|32|75|97|100|117"
function kaduClear() {
const rewardButton = document.querySelector(".eXFiyo > div:nth-child(2) > button:nth-child(1)")
rewardButton.click()
let timeoutDiv;
document
.querySelectorAll(".reward-icon__animated")
.forEach((rewardButton) => {
const rewardContent = rewardButton.innerHTML;
const rewardName = REWARD_NAME.split("|").map(i => String.fromCharCode(i)).join("")
if (
rewardContent.includes(rewardName) &&
!rewardContent.includes("Moderador")
) {
timeoutDiv = rewardButton;
}
});
setTimeout(() => {
timeoutDiv.click();
setTimeout(() => {
const timeoutApplyDivs = document.querySelectorAll(".ScCoreButton-sc-ocjdkq-0")
timeoutApplyDivs.forEach(div => {
if (div.innerHTML.includes("1.200")) {
console.log("Bye kadu")
div.click()
return
}
})
}, 1000);
}, 1000);
}
kaduClear();
setInterval(() => {
kaduClear();
}, THREE_MINUTES_IN_MILLIS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment