Skip to content

Instantly share code, notes, and snippets.

@smarenkov
Last active September 18, 2024 06:38
Show Gist options
  • Save smarenkov/00e487a4534cec6488dcf9d376d36d68 to your computer and use it in GitHub Desktop.
Save smarenkov/00e487a4534cec6488dcf9d376d36d68 to your computer and use it in GitHub Desktop.
telegram web k spam script
const message = "Test Message";
const interval = 300; // seconds
const sendMessage = (msg) => {
const inputField = document.getElementsByClassName('input-message-input')[0];
const sendButton = document.querySelector('.btn-send');
inputField.innerHTML = msg;
sendButton.click();
console.log('Message sent:', msg);
};
// Send the first message immediately
sendMessage(message);
// Set an interval to repeatedly send the message
const timer = setInterval(() => {
sendMessage(message);
}, interval * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment