Discord Command (Structure) — DiSky
Addon: DiSky · Category: Structure · Since: 5.0.0-a1
Syntax
discord command <([^\s]+)( .+)?$>Description
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.
Examples
discord command hello <user> [<n: number = 1>]:
prefixes: "!", "?"
aliases: hi
executable in: guild
cooldown: 5 seconds
cooldown message: "Slow down, %remaining cooldown% left."
usage message: "Usage: %usage of event-discordcommand%"
trigger:
loop {_n} times:
reply with "Hello %arg-1%!"