DiSky DiSky v5.0.0-b1

Chat commands

guide

Commands matched on what a user types in a channel, declared entirely in Skript and never registered on Discord.

commandschatdiscord

A chat command is matched on message text: the bot watches every message it receives and, when the text matches <prefix><name> <arguments>, runs the command's trigger. Nothing is registered on Discord. You're assumed to have a bot named "my-bot" logged in (see Starting a bot).

discord command ping:
    prefixes: "!"
    trigger:
        reply with "pong"

Sending !ping in any channel the bot can see runs the trigger and replies pong.

Chat or interaction commands

Need

Use

Answers to typed text, no Discord registration, works on any client

a chat command, this section

A /command shown by Discord's own picker, or an entry in the right-click Apps menu

an interaction command

Both families can live in the same script: a chat command reads its arguments from the message text, an interaction command gets them typed and validated by Discord before the bot sees them.

Reading order

  1. Declaring a command: the structure, prefixes, aliases, and what the trigger can read.
  2. Arguments: the argument grammar, types, resolution and named locals.
  3. Restricting a command: channels, roles, permissions, bots and cooldowns.
  4. Listing and events: on discord command used, every loaded command, and a help command.
Was this page 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.