DiSky DiSky v5.0.0-b1

Structures

structure

Global, non-entity structures, usable anywhere in your scripts.

4 syntaxes
4 / 4
structuresince 5.0.0-a1
define [the] [new] bot (with name|named) %string%

Declares and logs in a Discord bot from a config block — a reload-safe convenience over

'a new discord bot' + 'login'. The token is required; intents/cache/shard/activity/status are

optional. Lifecycle is handled by the global on ready / on shutdown events.

Helpful?
structuresince 5.0.0-a1
Feeling lost? This is covered in the guide Declaring a command
discord command <([^\s]+)( .+)?$>

Declares a command triggered by a message: '<prefix><name> <arguments>'. Arguments are written like

Skript's own commands ('<user>', '<n: number = 1>', '[<text>]'); Discord entities are resolved from a

mention, an id or a name before the trigger runs, so 'arg-1' / '{_n}' hold real values.

Entries: prefixes, aliases, description, usage, category, roles, permissions, bots, executable in

(guild, dm, threads, voice, text), cooldown, cooldown scope (user, guild, channel), permission message,

cooldown message, usage message, trigger. Without 'prefixes' the bare name matches.

Helpful?
structuresince 5.0.0-a2
Feeling lost? This is covered in the guide Slash commands
slash command <([\p{L}\p{N}_'-]+( [\p{L}\p{N}_'-]+){0,2})( .+)?$>

Declares a slash command: its path (up to three words: command, group, subcommand), its arguments as '<name: type>' (wrapped in [ ] when optional), and a trigger that runs when it is used. Every argument is available as '{_name}' and as 'arg-1' / 'user argument' in the trigger.

Entries: description (a text, or a section of 'locale: text' lines with en-US), name (a section of translated names), enabled for (permissions), disabled, nsfw, contexts, integration types, cooldown + cooldown scope + on cooldown, arguments (per argument: a description, or a section with description, choices and 'on completion request'), trigger.

Declaring 'slash command mod ban' and 'slash command mod kick' gives one '/mod' command with two subcommands; a 'slash command mod:' without trigger describes the root. Nothing is sent to Discord: register the result from 'on ready' / 'on guild ready' with 'update the discord commands (all structured application commands) in ...'.

Helpful?
structuresince 5.0.0-a2
Feeling lost? This is covered in the guide Context commands
user command <(.+)$>
message command <(.+)$>

Declares a user or message context-menu command (Apps > name when right-clicking a user or a message) and the trigger that runs when it is used: 'target user' / 'target message' give what was clicked.

Entries: name (a section of translated names), enabled for, disabled, nsfw, contexts, integration types, cooldown + cooldown scope + on cooldown, trigger. The name may contain spaces and capitals.

Nothing is sent to Discord: register it with 'update the discord commands (all structured application commands) in ...' from 'on ready' / 'on guild ready'.

Helpful?
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.