npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-omegle

v0.1.1

Published

An omegle library

Downloads

7

Readme

node-omegle

An Omegle client library for Node.js based off nucular's research

Example

const Client = require('node-omegle');
let client = new Client();

client.on('message', message => console.log(message));
client.on('disconnected', () => console.log('Disconnected'));

client.on('ready', () => client.connect());
client.on('connected', () => {
  console.log('Connected');
  client.send('beep boop i am a bot');
  setTimeout(() => client.disconnect(), 10000);
});

API Documentation

class OmegleClient

The base class representing the client

new OmegleClient(opts)

Constructor for the class

Arguments:

  • opts.language: Language code to send to omegle
  • opts.userAgent: User-Agent string to use for requests

connect(topics)

Connect to omegle

This method must be called after the ready event is fired

Arguments:

  • topics: List of interests to send to omegle

disconnect()

Disconnect from omegle, ending any chat that is ongoing

send(message)

Send a message to the chat

Arguments:

  • message: The message to send

startTyping()

Start "typing" on omegle

stopTyping()

Stop "typing" on omegle

stopLookingForCommonLikes()

Tells the omegle server to stop looking for a person with common interests. The web-based omegle client does this after a while.

sendCaptchaResponse(response)

Sends a response to the captcha requested by omegle. See the captcha section below for more information on how to handle captchas.

Arguments:

  • response: The text result to the captcha

transferSession(id, server)

Transfers a session by session id (with optional server argument).

Arguments:

  • id: Omegle session id
  • server: Optional server name to connect to

prepareTransferSession()

Stops fetching events and returns the session id so the session can be resumed elsewhere.

Returns the current session id

Events

  • ready: The instance has successfully fetched connection information from omegle, must be fired before connect is called
  • waiting: Waiting for a connection
  • connected: Connected to the other user
  • statusInfo: Status information from omegle
  • count: Doesn't really seem to ever be sent by omegle
  • commonLikes: Array of common interests
  • partnerCollege: College the user attends, if applicable
  • serverMessage: A "server message" from omegle
  • recaptchaRequired: The omegle server gave you a captcha to solve, see captcha section below
  • recaptchaRejected: Same as above, but the previous response was incorrect
  • identDigests: Identity stuff, seems to be used when submitting logs
  • error: Request error, thrown locally by the client
  • omegleError: Omegle gave you an error
  • connectionDied: The connection died abnormally
  • antinudeBanned: The client was banned to the unfiltered section for being bad
  • typing: User is typing
  • stoppedTyping: User has stopped typing
  • message: The user sent a text message
  • strangerDisconnected: The user ended the chat
  • unhandledEvent: Omegle sent something that we don't know what to do with

Handling captchas

You can't, because Google shut down reCAPTCHA v1 and omegle hasn't done anything about it yet

License

ISC