Skip to content

inergy/Trovo.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


trovo.js


Discord server NPM version NPM downloads Patreon

Table of contents

About

trovo.js is a powerful Node.js module that allows you to easily interact with the Trovo API.

Example usage

const Trovo = require('trovo.js');
const client = new Trovo.Client();

client.on("chatMessage", (msg) => {
  if (msg.content === 'ping') {
    client.sendMessage('pong');
  }
})

client.login('trovo_user_url', 'email', 'password');
// OR to login Anonymously without Mod functionality
client.login('trovo_user_url');

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested.

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Trovo.js Server.

Events

  • chatEvent ~ Event for a Group of Events
    • Sub Events
      • userJoined ~ When a user has joined a Channel
      • userFollowed ~ When a user has Followed the Channel
      • userSubbed ~ When a user has Subbed to the Channel
      • giftRecieved ~ When a user has sent a Gift to the Channel
  • chatMessage ~ General Chat Message from a User
  • dialog ~ Dialog popup output from the Browser [To be Removed when we move away from puppeteer]
  • console ~ Console output from the Browser [To be Removed when we move away from puppeteer]
  • wsClosed ~ Triggered when a Websocket is Closed.
  • wsCreated ~ Triggered when a Websocket is Created
  • jsonData ~ JsonData received.

Functions

  • newPage ~ Opens a new Page on the headless browsers.
  • login ~ Logins with a user, to a specific page.
  • sendMessage ~ Sends Message to the Channel
  • dialogResponse ~ used for when a dialog is triggered to send a emit [Internal]
  • consoleResponse ~ used for when a console output is triggered to send a emit [Internal]

About

First Trovo Chatbot Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%