DiSky
DiSky is a Skript addon for writing Discord bots in Skript, on your Minecraft server. It is built on JDA: anything a JDA bot can do, DiSky aims to expose as Skript syntax.
This branch is DiSky 5, a rewrite of DiSky 4. It is in public beta: most of DiSky 4 is covered, the syntax is close but not identical, and V4 scripts need a few changes (see the migration guide).
- Syntax reference: atlas.disky.me
- Porting DiSky 4 scripts: migration guide
- Download: Modrinth
- Bugs and requests: GitHub issues
Requirements
- A Paper server, 1.21.5 or newer (or a Paper fork such as Purpur)
- Java 21 or newer
- Skript 2.16.1 or newer, with
use type properties: truein itsconfig.sk(the default) - A bot token from the Discord Developer Portal
Installation
- Put
DiSky-<version>.jarin your server'splugins/folder, next to Skript. - Restart the server.
DiSky has no config file. At each boot it writes plugins/DiSky/disky-syntax.json, a list of every syntax it registered; you don't need to touch it.
Anonymous statistics (FastStats)
DiSky reports anonymous usage statistics and errors to FastStats. Nothing is sent during the first start: submission begins after the next restart, so you can opt out beforehand.
What is sent:
- Usage: a random server id (regenerated if you delete it), the DiSky version, the Minecraft version, the server software and its version, online mode, the player count, the Java vendor and version, the OS name, version and architecture, and the CPU core count.
- Errors: errors raised by DiSky syntaxes at runtime (the exception type, its message truncated to 500 characters and a shortened stack trace).
No IP address, player data, bot token, Discord content or script source is collected.
To opt out, edit plugins/faststats/config.properties (shared by every plugin that uses FastStats) and restart:
enabled=falseturns FastStats off entirely;submitMetrics=falsestops usage statistics only;submitErrors=falsestops error reports only.
The JVM flag -Dfaststats.enabled=false also turns it off.
A first bot
Save this as plugins/Skript/scripts/bot.sk, put your token in it, and run /sk reload bot:
options:
token: "YOUR-BOT-TOKEN"
on load:
set {_bot} to a new discord bot
set token of {_bot} to {@token}
login {_bot} as "my-bot"
on unload:
shutdown the bot named "my-bot"
# Slash commands are declared in the script, then sent to Discord explicitly.
on guild ready:
update the discord commands (all structured application commands) in event-guild
slash command ping:
description: Check that the bot is alive
trigger:
reply with hidden "Pong!"
slash command ban <target: member> [<reason: string>]:
description: Ban a member
enabled for: ban members
trigger:
try:
ban {_target} because of {_reason}
catch {_errors::*} and stop:
reply with hidden "Could not ban %{_target}%: %error meaning of {_errors::1}%"
reply with hidden "%{_target}% was banned."
on message received seen by "my-bot":
discord content of event-message is "!about"
set {_e} to a new discord embed
set title of {_e} to name of event-guild
set description of {_e} to "%member count of event-guild% members"
set color of {_e} to orange
reply with {_e}
hidden makes a reply visible only to the user who ran the command. If the ban fails (missing permission, member above the bot), the catch block gets a readable error instead of a stack trace in the console.
What you can do
- Bots: several bots at once, intents, cache settings, sharding, presence.
- Messages: send, reply, edit, delete, pin, react, read history; embeds, file uploads and downloads, polls.
- Commands: slash commands with typed options, autocomplete, subcommands, cooldowns and translations; user and message (right-click) commands; classic text commands with a prefix.
- Components: buttons, select menus, modals, and the newer layout components (containers, sections, galleries).
- Server management: members, roles and their order, channels and threads, permissions and channel overrides, emotes and stickers, invites, scheduled events, welcome screen, AutoMod rules, webhooks.
- Moderation: ban, kick, timeout, purge, audit log reasons.
- Events: about 130 Discord events, from messages and reactions to voice, roles and AutoMod.
The Atlas lists every syntax with its patterns and examples.
Three things that differ from plain Skript
Talking to Discord takes time. Anything that sends something to Discord (posting a message, banning a member) runs off the server thread, so your server never lags waiting for Discord. Values DiSky has in memory are read directly; values it has to ask Discord for are read with await, which waits for the answer:
await set {_bans::*} to bans of event-guild
Reading such a value without await is an error when the script loads, not a silent <none>.
Builders. To create something on Discord (a role, a channel, a message with several parts), you fill a builder first, then send it:
set {_b} to a new role builder named "Helpers" in event-guild
set color of {_b} to light blue
await set {_role} to the build result of {_b}
Errors. A failed Discord action prints a readable message to the console. Put it in a try block to handle it yourself, as in the ban command above, or listen to on discord error to catch the ones no try handled.
Coming from DiSky 4
DiSky 5 replaces DiSky 4: same plugin name, same Modrinth page, and addons that depend on DiSky keep working by name. V4 scripts do not run as-is.
Read the migration guide on the Atlas before switching a bot over. It gives the order to port a script in, before/after examples for every change (retrieve becoming await, builders, the discord prefix, commands, components, events), and the list of what DiSky 5 does not have yet.
Building from source
./gradlew build
Needs JDK 21. The plugin is build/libs/DiSky-<version>.jar (the -thin jar next to it does not contain JDA and will not load).
License
| Version | Minecraft | Loader | Download |
|---|---|---|---|
|
DiSky 5.0.0-b1 5.0.0-b1 |
1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3
|
paper, purpur
|
Download |
|
DiSky 4.29.0 4.29.0 |
1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
|
paper
|
Download |
|
Role colors, checkboxes/radios, file uploads in modals and more! 4.28.0 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
|
paper, purpur, spigot
|
Download |
|
Support for Skript 2.14, new features, hotfixes, and more! 4.27.0 |
1.19.4, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11
|
paper, purpur, spigot
|
Download |
|
QoL Update & Embed Enhancements 4.26.0 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10
|
paper, spigot
|
Download |
|
Components V2 with modals are here! 4.25.0 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8
|
paper, spigot
|
Download |
|
Bugfixes & new retrieve pinned message effect! 4.24.0-beta3 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8
|
paper, spigot
|
Download |
|
Message/User Commands now finally work! 4.24.0-beta2 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8
|
paper, spigot
|
Download |
|
Components V2 is here! 4.24.0-beta1 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8
|
paper, spigot
|
Download |
|
New event system, stickers & emojis events, and more! 4.23.0 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5
|
paper, spigot
|
Download |
|
DiSky 4.23.0-alpha3 4.23.0-alpha3 |
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5
|
bukkit, paper, spigot
|
Download |
|
DiSky 4.23.0-alpha2 4.23.0-alpha2 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5
|
paper, spigot
|
Download |
|
The event-rework update is here! 4.23.0-alpha1 |
1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5
|
paper, spigot
|
Download |
|
Command Registration & Message Handling 4.22.1 |
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
|
paper, spigot
|
Download |
|
DiSky 4.22.0 4.22.0 |
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
|
paper, spigot
|
Download |
|
The quickest update ever? 4.21.1 |
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
|
paper, spigot
|
Download |
|
The biggest update yet? 4.21.0 |
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
|
paper, spigot
|
Download |
|
The Improvement Update 4.20.2 |
1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
|
bukkit, paper, spigot
|
Download |
|
Hotfix: delayed bot initialization 4.20.1 |
1.13, 1.13.1, 1.13.2
|
bukkit, paper, spigot
|
Download |
|
The Async Acceleration Update 4.20.0 |
1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1
|
bukkit, paper, spigot
|
Download |
|
Listen once section, bugfixes and more! 4.19.0 |
1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1
|
paper, spigot
|
Download |
|
The 'long time no see' update 4.18.0 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21
|
bukkit, paper, purpur, spigot
|
Download |
|
The "Mixed Additions" update! 4.17.2 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6
|
paper, spigot
|
Download |
|
Hot & bug fixes Latest 4.17.1 |
1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6
|
paper, spigot
|
Download |
|
Slash Structure, QoL enchantements and bug fixes! 4.17.0 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6
|
paper, spigot
|
Download |
|
Bugfixes & New Features! 4.16.0 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6
|
paper, spigot
|
Download |
|
Bugfixes & QoL Enhancements 4.15.1 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5
|
paper, spigot
|
Download |
|
DiSky 4.15.0 4.15.0 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5
|
paper, spigot
|
Download |
|
Oh my god, too much update?! 4.14.3 |
1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
|
paper, spigot
|
Download |
|
And yet another update! 4.14.2 |
1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
|
paper, spigot
|
Download |
|
Better polls and optimizations 4.14.1 |
1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
|
paper, spigot
|
Download |
|
The "Asynchronous" Update 4.14.0 |
1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
|
paper, spigot
|
Download |
|
DiSky 4.12.2-beta1 4.12.2-beta1 |
1.13, 1.13.1, 1.13.2
|
spigot
|
Download |
|
DiSky 4.12.2-beta1 4.12.2-beta1 |
1.13, 1.13.1, 1.13.2
|
paper
|
Download |
|
The cleanup update! 4.12.1 |
1.13, 1.13.1, 1.13.2
|
paper, purpur, spigot
|
Download |
|
The 'I don't have any title' update is here! 4.12.0 |
1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
|
folia, paper, purpur
|
Download |
|
Voice message & member flags supports! 4.12.0-beta2 |
1.13
|
paper, spigot
|
Download |
|
Bug fixes & enhancements 4.11.1 |
1.19.4
|
paper, spigot
|
Download |
|
DiSky 4.11.0 4.11.0 |
1.19.3
|
paper, spigot
|
Download |
|
DiSky v4.10.0 4.10.0 |
1.19.3
|
paper, spigot
|
Download |
|
DiSky v4.9.0 - Audio updates & default expressions. 4.9.0 |
1.13, 1.19.3
|
bukkit
|
Download |
|
Scheduled events, bugfixes and much more! 4.8.0 |
1.19.3
|
paper, spigot
|
Download |
|
Conflicts & Bug fixes + Member Thread Management 4.7.0 |
1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2
|
paper, purpur, spigot
|
Download |