I tried applying this using ChatGPT, but it didn't work for me. Can you tell me where to put this code to make my code work?
// Функция для эмуляции нажатия мыши внутри элемента <canvas data-sentry-element="Stage"> function simulateMouseClickInCanvas() { const canvas = document.querySelector('canvas[data-sentry-element="Stage"]'); if (!canvas) { console.error("Элемент <canvas> не найден."); return; } const rect = canvas.getBoundingClientRect(); // Выбираем случайные координаты внутри элемента <canvas> const randomX = Math.random() * rect.width + rect.left; const randomY = Math.random() * rect.height + rect.top; // Создаём события мыши const mouseDownEvent = new MouseEvent("mousedown", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const mouseUpEvent = new MouseEvent("mouseup", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const clickEvent = new MouseEvent("click", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); // Эмулируем события canvas.dispatchEvent(mouseDownEvent); canvas.dispatchEvent(mouseUpEvent); canvas.dispatchEvent(clickEvent); } // Функция для выполнения кликов с рандомной задержкой function performRandomClicksInCanvas(maxClicks) { let clicksCount = 0; function clickWithRandomDelay() { if (clicksCount >= maxClicks) { console.log("Все клики выполнены"); return; } const delay = Math.random() * (2000 - 100) + 100; // Рандомная задержка от 0.1 до 2 секунд setTimeout(() => { simulateMouseClickInCanvas(); clicksCount++; console.log(`Клик ${clicksCount} выполнен (задержка: ${Math.round(delay)} мс)`); clickWithRandomDelay(); // Рекурсивный вызов для следующего клика }, delay); } clickWithRandomDelay(); } // Запуск выполнения 10 кликов performRandomClicksInCanvas(10);How to login to Discord with TOKEN [JavaScript]
-
I try Javascript to login to discord accounts with token in B.A.S program but it redirects me to the discord.com/login page again
I looked at the topics in the forum, maybe I can solve it, but it didn't work, I keep getting an error.
i am using this codefunction login(token) {
setInterval(() => {
document.body.appendChild(document.createElementiframe).contentWindow.localStorage.token ="${token}"
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login("")


-
Is your token valid and still working?
if that is the case use this code.(function() {window.t = "TOKENHERE";window.localStorage = document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage;window.setInterval(() => window.localStorage.token = `"${window.t}"`); window.location.reload();})();For me this codes works always.
-
@NotWegant i solved the problem but i have another problem i wrote you via telegram
-
I did not receive any message from you, how do you have my telegram?
please dm me again: https://t.me/tokifynet -
@NotWegant said in How to login to Discord with TOKEN [JavaScript]:
Is your token valid and still working?
if that is the case use this code.(function() {window.t = "TOKENHERE";window.localStorage = document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage;window.setInterval(() => window.localStorage.token = `"${window.t}"`); window.location.reload();})();For me this codes works always.
You help me a lot. Thank you very much.