pw-js-api 0.3.15-dev.2f3e25b → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,18 +33,18 @@ NOTE: installing pw-js-api#dev is also available if you wish, there may be no di
|
|
|
33
33
|
You could use a CDN like jsdelivr or unpkg. You can put this in your HTML page:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.3.15/browser/pw.prod.js"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
```html
|
|
40
|
-
<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.
|
|
40
|
+
<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.3.15/browser/pw.dev.js"></script>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
When you have these scripts in your HTML file, you will be able to use the global variable PW which contains PWGameClient, PWApiClient and Constants.
|
|
44
44
|
|
|
45
45
|
## Example
|
|
46
46
|
|
|
47
|
-
Feel free to take a look at the [source code for an example bot](
|
|
47
|
+
Feel free to take a look at the [source code for an example bot](/examples/index.mjs) that only does snake and listen to certain chat commands (.ping, .say and .disconnect)
|
|
48
48
|
|
|
49
49
|
## Why?
|
|
50
50
|
|