1.1.0 • Published 1 year ago

omegle.js v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

omegle.js

Create omegle bots using node.js

GitHub GitHub package.json version (subfolder of monorepo) npm 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

Must have node v14.0.0 or later

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

1.1.0

1 year ago

1.0.0

1 year ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.1

4 years ago