Posts > JaylyBot
By Jayly · 6/7/2024

JaylyBot

JaylyBot stands for "JaylyMC's Discord Bot". It is a Discord bot used in over 200 Discord servers which includes various Minecraft Scripting API toolings such as a TypeScript debugger for Minecraft scripting, within Discord.

The invite link to the bot is at the bottom of the post.

NPM Package Metadata

The type definition files (declaration files that contain only type information) for Minecraft modules such as @minecraft/server are hosted on npmjs.com. This bot provides additional infomation on installing specific packages for Minecraft script development, and custom type definition files used in Script API Debugger for reference.

/docs info

The /docs info command returns installation commands for all Minecraft's npm packages tied to specific Minecraft versions. It was made because the Minecraft developers cannot manage to categorise the versions into 4 labels or 'dist-tags' on npm.

Docs info message

How does it work?

The npm version infomation are generated through a generator specifically for Script API, which involve parsing version strings with funky regex.

/docs dump

The /docs dump command posts generated custom type definition of a Minecraft module used for Script API debugger. Keep in mind that some of the types may have modified from the original npm package files.

Docs dump

ScriptAPI Examples

JaylyBot retrieves code exmaples from the ScriptAPI repository. Through the /script get command, users can search for a script listed in scripts directory in the GitHub repository (in the 'main' branch).

Script get command

Script API Debugger

This Discord bot can mainly debug your Minecraft scripts, for both Stable and Preview version of Minecraft. It is made possible through integrating TypeScript compiler into Discord.

Script Debugger message type

Before debugging your scripts, make sure send your scripts with code blocks, with language type in js or ts:

```js
console.log("Hello World");
```

or with JavaScript / TypeScript files:

Debug files

Using Debugger (PC)

How to debug in PC

  1. Right click the message
  2. Go to Apps
  3. Select Debug Scripts

Upon selecting the action, this dropdown appears for you to choose the Minecraft version your script is run in.

Select debugger in PC

  • Latest APIs: Debug scripts using non-experimental APIs for Minecraft release builds.

  • Latest Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft release builds.

  • Preview APIs: Debug scripts using non-experimental APIs for Minecraft Preview builds.

  • Preview Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Preview builds.

Using Debugger (Mobile)

How to debug in mobile

  1. Long press the message
  2. Go to Apps
  3. Select Debug Scripts

Upon selecting the action, this dropdown appears for you to choose the Minecraft version your script is run in.

Select debugger in mobile

  • Latest APIs: Debug scripts using non-experimental APIs for Minecraft release builds.

  • Latest Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft release builds.

  • Preview APIs: Debug scripts using non-experimental APIs for Minecraft Preview builds.

  • Preview Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Preview builds.

Important Notes for Script Debugger

  • JaylyBot doesn't run JavaScript or TypeScript code remotely. The code is only parsed by TypeScript compiler.
  • JavaScript or TypeScript code or files are only stored temporarily for debugging purposes and removed permanently after the bot responds with debug result.
  • This is a debugger for Minecraft Script API only. Addons JSON is not supported.
  • This is not to be confused with Mojang's Minecraft Scripting Debugger extension for VSCode.

Invite the Bot

This Discord bot is public for everyone to invite to their Discord server, check it out: