Skip to content

Coding Shiksha

Menu
  • Home
  • Youtube Channel
  • Online Store
  • Online Tools
  • Donate Us
  • Sitemap
  • Privacy Policy
Menu

Build a Omegle Bot in Javascript to Automate it in Browser Console Full Project For Beginners

Posted on October 29, 2022

Welcome folks today in this blog post we will be building a omegle bot in javascript and automate it in browser console. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to go to omegle.com and after that you need to go to inspect element and go to browser console as shown below

 

 

 

 

 

 

And now you need to copy paste the below javascript code to automate the omegle messages to users and build a bot

 

 

JavaScript
1
2
3
4
5
6
7
8
9
10
function executeOmegle()
    {
      let btn = document.querySelector('.disconnectbtn')
      let messageBox = document.querySelector('.chatmsg')
      let sendBtn = document.querySelector('.sendbtn')
      btn.click()
      messageBox.innerHTML="This is the message for the bot"
      sendBtn.click()
    }
    setInterval(executeOmegle,2000)

 

 

As you can see in the above function we are targeting the dom elements using their classes and then we are passing the default message to be sent to the omegle users. And then automatically we are clicking the button to send that message. And also we are setting the delay in between the messages. This delay is in milliseconds. And then we are clicking the button using the click() method And also we are using the setInterval() method and here we are calling the executeOmegle() method and also passing the delay of the bot as well in the second argument.

 

And now if you run the omegle bot inside the browser as shown below

 

 

 

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2023 Coding Shiksha | Design: Newspaperly WordPress Theme