0.1.7 • Published 2 years ago
ts-showdown-bot v0.1.7
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
2 years ago
0.1.65
2 years ago
0.1.66
2 years ago
0.1.67
2 years ago
0.1.51
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.42
3 years ago
0.1.43
3 years ago
0.1.41
3 years ago
0.1.4
3 years ago
0.1.32
3 years ago
0.1.33
3 years ago
0.1.34
3 years ago
0.1.31
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago