logo bannerlogo banner

using the bundles

Warning

this is for yolkbot 2.0, which has not yet released. visit the existing documentation to learn about the current version of yolkbot.

yolkbot has two bundles based on your use case:

  1. modular bundle (<script type="module">) - for modern websites and smaller projects that like ESM support
  2. 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_DATA intent - full item/skin data isn't packed in these bundles (for size)
  • no CHALLENGES intent - 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 proxy prop - 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)

go build more bots!