0.1.7 • Published 3 years ago

ts-showdown-bot v0.1.7

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

A simple, easily customizable bot for connecting to Pokemon Showdown.

THIS PACKAGE IS DEPRECATED: USE https://npmjs.com/package/psim.us instead

This package has one requirement for connecting to PS.

  • A WebSocket instance (we recommend sockjs-client or WebSocket.) (We used to require a HTTP fetcher, and in fact still support it, but we have a native version in src/utils, so it is not required.) For customizing fetch, just pass the fetcher instead of null in the second argument.

From there, all you need to do is as follows: (TS)

import PSInterface from 'ts-showdown-bot';
import SockJS from 'sockjs-client';

const PS = new PSInterface({
    name: 'uwu', pass: 'uwu',
}, null, SockJS);

(JS)

const {PSInterface} = require('ts-showdown-bot');
const SockJS = require('sockjs-client');

const PS = new PSInterface({
    name: 'uwu', pass: 'uwu',
}, null, SockJS);

From there, the bot will start automatically. As for adding your own plugins, all you need to do is call PSInterface#loadPluginFrom(absolute path). See src/commands.ts for how those work.

0.1.7

3 years ago

0.1.65

3 years ago

0.1.66

3 years ago

0.1.67

3 years ago

0.1.51

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.42

4 years ago

0.1.43

4 years ago

0.1.41

4 years ago

0.1.4

4 years ago

0.1.32

4 years ago

0.1.33

4 years ago

0.1.34

4 years ago

0.1.31

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago