# Pill Wheelポチポチbot **Published by:** [Something about Web3](https://paragraph.com/@0xkyosuke/) **Published on:** 2024-05-28 **URL:** https://paragraph.com/@0xkyosuke/pill-wheel-bot ## Content まえがきFarcasterのframeは言うてもiframeなのでJavascriptで操作できる。 ポチポチゲーはbot作って自動化しないともったいない。 もちろん無効になるリスクはあるけどリターンとの兼ね合いを考えると躊躇しても意味ない気がする。 だってどうせ短命やん。 今回のターゲットは👇️ https://warpcast.com/pilll/0xeabcccf9注意点不定期にエラーが出ます。おそらくレートリミット。Farcaster側で制御してるっぽく、frame全部がしばらく死にます。 そうなったらしばらく待ってからページをリロードしてコードを実行させたらOKです。やり方調べてください。コード// ボタンのテキストが「🔄Spin -100 points」であるボタンを探す関数 function findButtonByLabel(label) { const buttons = document.querySelectorAll('button'); for (let button of buttons) { if (button.innerText.includes(label)) { return button; } } return null; } // ランダムな間隔でボタンをクリックする関数 function autoClickButton(label) { function clickButton() { const button = findButtonByLabel(label); if (button) { button.click(); } else { console.log(`ボタンが見つかりません: ${label}`); } // 次のクリックまでのランダムな間隔を設定 // 下はインターバルが2秒から4秒 // (a-b)+c // a: max, b: min, c: interval const randomInterval = Math.random() * (4000 - 2000) + 2000; setTimeout(clickButton, randomInterval); } clickButton(); } // 「🔄Spin -100 points」のラベルのボタンを自動クリック autoClickButton('🔄Spin -100 points'); ## Publication Information - [Something about Web3](https://paragraph.com/@0xkyosuke/): Publication homepage - [All Posts](https://paragraph.com/@0xkyosuke/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@0xkyosuke): Subscribe to updates - [Twitter](https://twitter.com/0xKyosuke): Follow on Twitter