last edited: 2026-01-26
hi! migrating to yolkbot 1.5 is relatively easy, and there's just a quick list below that you need to go through to make sure your bot works as you expect.
before we delve in, we need to briefly discuss error handling in yolkbot 1.5.
instead of returning strings or logging (most) errors, yolkbot 1.5 now returns objects with an ok property. for example, bot.join will either return:
{ ok: true, game: Game }
or:
{ ok: false, error: JoinError.GameNotFound }
JoinError is one of our new enums. enums come from yolkbot/enums, and you can import them like so:
import { JoinError } from 'yolkbot/enums';
a full list of enums can be found in the yolkbot/enums documentation.
this applies to almost ALL functions that returned string errors in API and Bot; it is a MAJOR change and the biggest breaking one here.
error hook (bot.on('error', ...)) has been removedbot.processError has been removedNO_EXIT_ON_ERROR intent has been removedenums aren't just used for errors. for example, Intents have been turned into an enum as well. on that note...
recoil) have been removedyolkbot/constants/guns, you don't need to run new Gun(...) anymore; the constants now just direct objectsURLRewards from yolkbot/constants has been removed; maintain it yourselfbot.game.collectables has been renamed to bot.game.collectibles (US vs UK spelling)pathfindError error with the parameter of a PathfindError enum from yolkbot/enumsimport { ChatDispatch } from 'yolkbot/dispatches'; the new bot.emit (see the 1.5 infosheet for more) should be used instead (or import from yolkbot/dispatch/ChatDispatch directly)playerReload has been split into playerStartReload and playerEndReloadMapNode.positionStr and MapNode.position have been removed; use MapNode.positionKey - it is a unique key for the node's positionMapNode.flatCenter() has been replaced with MapNode.flatCenter (it is no longer a function)pather property no longer exists on GoTo dispatches, use bot.pathing.astaryolkbot/wasm/util has been removed; any utilities you used from there will need to be reimplemented by youBot & API have been removed
apiMaxRetries / maxRetries - this was misused; 5 is good enoughsuppressErrors - use the new errorLogger with an empty functionyolkws / yolkbot/socket has the second parameter now as an object and now a string
new YolkWS(url, 'socks5h://proxy')new YolkWS(url, { proxy: 'socks5h://proxy' })errorLogger support!bot.state.left has been removed in favor of bot.state.inGamebot.game.map.nodes has been removed. i have absolutely no idea what this is, maybe it's bot.pathing.nodeList? i forgot. if you used this, please reach out on discord and tell me what this was.Intents have been moved to yolkbot/enums
bot.Intents.PATHFINDINGimport { Intents } from 'yolkbot/enums'; Intents.PATHFINDINGbot.game.kotc has been created
bot.game.stage -> bot.game.kotc.stagebot.game.zoneNumber -> bot.game.kotc.zoneIdx (NOTE: NAME CHANGED)bot.game.activeZone -> bot.game.kotc.activeZonebot.game.capturing -> bot.game.kotc.capturingbot.game.captureProgress -> bot.game.kotc.captureProgressbot.game.capturing -> bot.game.kotc.teamCapturing (NOTE: NAME CHANGED; changed in 1.5.1)bot.game.numCapturing -> bot.game.kotc.numCapturingbot.game.capturePercent -> bot.game.kotc.capturePercentbot.account.isDoubleEggWeeknd() is now imported from yolkbot/utilNO_LOGIN intent has been renamed to SKIP_LOGINbot.once has been removed because your LLMs you use to vibe code keep fucking it up and i'm tired of handling the DMs about itbot.initMatchmaker has been removed; use bot.initSession (it is basically the same)
bot.createMatchmaker()bot.matchmaker (aka yolkbot/matchmaker) has been removed and merged into Bot
NO_REGION_CHECK intent has been removed; call bot.getRegions with a custom instance that returns your custom regionbot.matchmaker.connected is the samebot.matchmaker.regionList -> bot.regionListbot.matchmaker.proxy -> bot.proxybot.matchmaker.sessionId -> bot.account.sessionIdbot.matchmaker.send -> bot.matchmaker.send
bot.matchmaker.getRegions -> bot.getRegions (different output due to error handling changes, beware)bot.matchmaker.waitForConnect / bot.matchmaker.on('open') -> removed; if bot.matchmaker is null just run bot.createMatchmaker()bot.matchmaker.on('msg', cb) -> add/remove callbacks from bot.matchmakerListenersyolkbot/comm has been removed
CommIn is at yolkbot/comm/CommInCommOut is at yolkbot/comm/CommOutCommCode is at yolkbot/constants/CommCodeCloseCode is at yolkbot/constants/CloseCodeAccountFirebase type in yolkbot/bot has been renamed to RawFirebase and moved to yolkbot/apionYolkReady in browser bundles has been removedbot.process* has been removed and split into different files
bot.packetHandlersbot.quit has had the primary param changed into levels: see CleanupLevel enum in yolkbot/enums
CleanupLevel.FullCleanupLevel.NoneCleanupLevel.Partial - cleans up functions like websockets but not bot.account, bot.players, etc