Socket
Socket
Sign inDemoInstall

showdown-client

Package Overview
Dependencies
76
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    showdown-client

Client for Pokemon Showdown


Version published
Maintainers
1
Install size
7.94 MB
Created

Readme

Source

Showdown Client

showdown-client is a Showdown client library written in JavaScript for Node.js (and io.js).

Installation

You can get this module using npm.

npm install showdown-client

Basic Usage

This library provides basic Showdown client functionality. For example, you can connect to main Showdown server like this.

var ShowdownClient = require('showdown-client');
var client = new ShowdownClient();
client.connect('showdown').then(function () {
    return client.login('username', 'password');
}).then(function () {
    return client.join('techcode');
});

Of course, that by itself is not really useful. Most of work is done by events. For example, if you want to listen for messages, you can listen to message event.

client.addListener('message', function (message) {
    console.log("Received message from " + message.user + " saying " + message.text);
});

FAQs

Last updated on 12 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc