GithubHelp home page GithubHelp logo

omegle.js's Introduction

omegle.js

Interact with omegle using node.js

GitHub GitHub package.json version (subfolder of monorepo) Github Github

NOTE

Please dont use this to abuse omegle. There is too much scam bots in omegle already, we dont need another one

Installation

npm install omegle.js
# Or
yarn add omegle.js

Example

import OmegleClient from 'omegle.js'
// or const OmegleClient = require('omegle.js')

const client = new OmegleClient()

client.on('connected', () => {
  console.log('Connected')
})

client.on('message', (message) => {
  client.sendMessage(`[BOT] ${message}`)
})

client.connect({
  topics: ['friend', 'gaming']
})

Docs

OmegleClient

options

  • debug (boolean)
    - Will print out the events if set to true
    Default: false

  • server (string)
    - Sets the server api the client will be using
    Default: https://front10.omegle.com

properties

  • connected
    - Connection state will set to true if connected
    Returns: boolean

  • messages
    - The messages of the current session
    Returns: Array<string>

  • typing
    - If the client is currently typing
    Returns: boolean

methods

  • connect(options)
    - Connect the client
    Options:

    • lang (string)
      Default: en

    • topics (Array<String>)
      Default: []

  • disconnect()
    - Disconnect the client

  • sendMessage(message: string)
    - Send a message

  • startTyping()
    - Send a typing indicator

  • stopTyping()
    - Stop a typing indicator

  • on(event: string, callback: function)
    - Listen to a event

events

  • connected
    - Fires when the client is connected

    • Params: (commonLikes?: Array<string>)
  • disconnected
    - Fires when the client is disconnected

  • message
    - Fires when the stranger send a message

    • Params: (message: string)
  • typing
    - Fires when the stranger is typing

  • stoppedTyping
    - Fires when the stranger stopped typing

Contributing

Feel free to make the library better by forking and making a pull request :>

LICENSE

MIT

omegle.js's People

Contributors

qxb3 avatar atulbhatt-system32 avatar

Stargazers

 avatar Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.