JaylyBot
JaylyBot provides a collection of utilities and tools for Minecraft Script APIs on Discord. It is a Discord bot used in over 350 servers to enhance your Minecraft Add-On development with Script API.
This bot uses TypeScript compiler, discord.js, Minecraft Scripting Libraries and type definitions for Minecraft Bedrock Script APIs, available through npm at npmjs.com.
Invite the Bot
You can invite the bot to your Discord server using this invite link.
Running Script API Debugger
To debug your Minecraft scripts in Discord, you have to send a message in a text channel which includes samples of code with fenced code blocks with syntax highlighting.
In your fenced code blocks, you must also add a language identifier to clarify which language you are using.
For example, to syntax highlight JavaScript code:
```javascript
console.log("Hello World");
```
The bot currently supports the following language identifiers, any other will not work:
javascript
orjs
typescript
orts
Tip
Use lower-case language identifiers, otherwise the bot's debugger may not work.
Another option is to upload a file, with file names end in .js
or .ts
to debug the file. This is useful when your code size is greater than the character limit for messages of 2000 characters.
You can also upload multiple script files in a single message, which the debugger creates a sandboxed environment with all the files in the directory to debug your scripts.
For example, to upload a JavaScript file named message.js
:
Using Debugger on Desktop
Here's a step-by-step instruction on running the debugger on Discord through the desktop app or on browser.
- Right click the message
- Go to Apps
- Select Debug Scripts
Example image on selecting Debug Scripts on desktop app:
Upon selecting the action, this dropdown appears for you to choose the Minecraft version your script is run in.
-
Latest APIs: Debug scripts using stable APIs for Minecraft Bedrock Edition.
-
Latest Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Bedrock Edition.
-
Preview APIs: Debug scripts using stable (release candidate) APIs for Minecraft Preview.
-
Preview Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Preview.
Using Debugger on Mobile
Here's a step-by-step instruction on running the debugger on Discord through the mobile app.
- Long press the message
- Go to Apps
- Select Debug Scripts
Example image on selecting Debug Scripts on mobile app:
Upon selecting the action, this dropdown appears for you to choose the Minecraft version your script is run in.
-
Latest APIs: Debug scripts using stable APIs for Minecraft Bedrock Edition.
-
Latest Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Bedrock Edition.
-
Preview APIs: Debug scripts using stable (release candidate) APIs for Minecraft Preview.
-
Preview Beta APIs: Debug scripts that requires Beta APIs experimental enabled for Minecraft Preview.
Additional Features
JaylyBot also provides additional tools and utilities for Minecraft Script API. These features are available as part of Discord's slash commands.
To access slash commands, all you have to do is type /
in chat and you're ready to use JaylyBot!
Type Definitions for Minecraft Bedrock Script APIs
You can access Minecraft Bedrock Script APIs through JaylyBot using the following commands:
-
/docs info
This command prints instructions for installing type definition for each Minecraft script modules using npm. The infomation is updated as soon as Minecraft or Minecraft Preview updates.
Example result of running
/docs info @minecraft/server
command: -
/docs dump
This utility command is used to send type definition files used in Script API debugger.
Example result of running
/docs dump latest @minecraft/server
command:
Script API Examples
JaylyBot can retrieve Minecraft script exmaples from the ScriptAPI repository. Through the /script get
command, users can search for a script listed in scripts directory in the GitHub repository.
Example image of running the /script get
command:
Once the bot found a script example you desire, it will output the following message:
Utility Commands
-
/issue
A command to report any issues with the Discord bot.
An image preview of issue modal form:
-
/runtime debug
Retrieves engine infomation of the bot for debugging purposes.
-
/uptime
Retrieves the period of time the bot has been continuously working and available. This command is for debugging purposes.