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
// ==/UserScript==
to see everything exported (aka available on the yolkbot.* object), you can check the API reference.
these bundles ship without bot.account.challenges / ChallengeList, socks proxies, and map caching. if you require these features, you must move to the desktop environment.