using the bundles
yolkbot has two bundles based on your use case:
- modular bundle (
<script type="module">) - for modern websites and smaller projects that like ESM support - global bundle (
window.yolkbot) - for tampermonkey scripts, raw HTML apps, and other basic web environments
both of them are distributed off of dist.yolkbot.xyz:
to use the modular bundle, import it like you would any other ESM module:
<script type="module">
import * as yolkbot from 'https://dist.yolkbot.xyz/module.min.js';
// or specific classes
import { Bot } from 'https://dist.yolkbot.xyz/module.min.js';
</script>
to use the global bundle, add it to your page and access the yolkbot global:
<script src="https://dist.yolkbot.xyz/global.min.js"></script>
// ==UserScript==
// @name My Yolkbot Script
// @description A script that uses yolkbot
// @require https://yolkbot.xyz/browser/global.js
to see everything exported (aka available on the yolkbot.* object), you can check the API reference.
both of these bundles have some features disabled:
- no
COSMETIC_DATAintent - full item/skin data isn't packed in these bundles (for size) - no
CHALLENGESintent - challenge data isn't packed in these bundles (for size) - limited map data - some map data (i.e. public/private status) isn't packed but still available when you join a game
- no
proxyprop - browsers do not support these, so support wasn't packed - no map caching - no caching of map data (it's loaded from CDN every time)